Skip to content
● Grav 2.2 is out: 2x faster cold starts and 96% less memory on big sites. Read the announcement →

Flex Objects in modular page

Solved by Karmalakas View solution

Started by Pascal Holz 5 years ago · 2 replies · 687 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 webmasterodp, 1 week ago
4 174 1 week ago
Support · by nwhitfield, 1 week ago
2 151 1 week ago
Support · by stell, 3 weeks ago
5 383 2 weeks ago
Support · by gravinator, 1 month ago
5 575 2 weeks ago
Support · by Gravver, 3 weeks ago
6 361 3 weeks ago