Skip to content
● Meet Grav Guard: keep every Grav site you run secure and up to date, all from one place. Free for up to 3 sites. Read more →

Flex Objects in modular page

Solved by Karmalakas View solution

Started by Pascal Holz 5 years ago · 2 replies · 1132 views
5 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

5 years ago Solution

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

5 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 TomW, 2 weeks ago
8 228 11 hours ago
Support · by alex, 2 months ago
8 667 1 day ago
Support · by Supple, 5 days ago
1 98 2 days ago
Support · by TomW, 1 week ago
3 160 3 days ago
Support · by TomW, 6 days ago
2 106 6 days ago