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

Community guidelines

Please keep discussions civil and on-topic. Repeated violations may lead to a temporary ban.

Support

How to use two or more modular templates?

Started by Black Lab 7 years ago · 2 replies · 609 views
7 years ago

Just wondering if I can have more than one modular templates, for example:

modular1.html.twig

  • with module template inside modular1/

modular2.html.twig

  • with module template inside modular2/

modular3.html.twig

  • with module template inside modular3/

I have tried but it seems a modular page will look for modular.html.twig?

7 years ago

Pretty sure you can. Just try naming the folder containing your modules the same as the modular file.
I mean. It makes sense when I say it. No idea if it's gonna work.
I'm curious.

👍 1
7 years ago

Yeah, this works:
pages/modular1.md --> templates/modular1.html.twig

but it seems grav will still look for module templates inside "templates/modular" folder.

Suggested topics

Topic Participants Replies Views Activity
Support · by Thomas, 1 week ago
2 53 9 hours ago
Support · by Anna, 3 days ago
2 59 12 hours ago
Support · by Justin Young, 13 hours ago
1 30 13 hours ago
Support · by Duc , 1 week ago
2 65 5 days ago
Support · by Colin Hume, 1 week ago
2 56 5 days ago