Skip to content
Grav 2.0 is officially stable. Read the announcement →
Support

Flex Objects in modular page

Solved by Karmalakas View solution

Started by Pascal Holz 4 years ago · 2 replies · 519 views
4 years ago

Hello everyone,
currently i am creating a new theme using flex objects for displaying event dates. It works like a charm on normal pages.

Now i want to render a flex collection also in a modular page.
So like on normal pages i created a flex-objects.md file pointing to the right directory and layout.

Content of flex-objects.md:
[code]

title: 'Bevorstehende Veranstaltungen'
heading: 'Bevorstehende Veranstaltungen'
background_image: bg_start_termine.jpg
linkurl: /veranstaltungen
flex:
layout: small

directory: events

[/code]

But running the page i get following error:
ERROR: modular/flex-objects.html.twig template not found for page: /home/_naechstetermine

What did i miss? Is ist possible to render Flex Collections and Objects in modular pages?

Thanks for your help

4 years ago Solution

Try copying flex-objects.html.twig from /templates to /templates/modular and remove base template inheritance from that template

4 years ago

Great. It worked.
Why didn't I think of that myself?
:person_facepalming:

Thanks for your help!

Suggested topics

Topic Participants Replies Views Activity
Support · by Duc , 8 hours ago
1 34 8 hours ago
Support · by Thomas, 1 week ago
3 105 17 hours ago
Support · by Anna, 4 days ago
2 101 2 days ago
Support · by Justin Young, 2 days ago
1 67 2 days ago
Support · by Duc , 1 week ago
2 106 6 days ago