Skip to content
Grav 2.1 is out: every page speaks Markdown. Read the announcement →

Which twig template

Started by Richard Hainsworth 8 years ago · 1 replies · 581 views
8 years ago

plugins, such as form, provide twig templates with the same name as templates provided by the theme, eg. forms/form.html.twig

How do I find out, or work out, which template is applied?

The Grav system applies the first template with the right name. But which template is found first when there are multiple templates with the same name in the theme and plugins?

8 years ago

To find out, put code or markup in one that you know would be executed (e.g. not in an if block) if the template is used.

I am pretty sure any plugin template is overridden by templates in your theme though. The idea being that these are safe from plugin updates.

Cheers

Suggested topics

Topic Participants Replies Views Activity
General · by jeremycherfas, 1 week ago
4 181 2 days ago
General · by lynbor, 6 days ago
2 122 3 days ago
General · by Old Man Umby, 1 week ago
1 100 1 week ago
General · by Sebastian, 1 week ago
1 124 1 week ago
General · by Andy Miller, 3 weeks ago
0 248 3 weeks ago