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 →

Which twig template

Started by Richard Hainsworth 9 years ago · 1 replies · 694 views
9 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?

9 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 themetman, 24 hours ago
2 40 17 hours ago
General · by Hanns Mattes, 1 week ago
0 121 1 week ago
General · by Karmalakas, 1 week ago
2 185 1 week ago
General · by Hanns Mattes, 3 weeks ago
0 235 3 weeks ago
General · by Dima, 4 weeks ago
1 211 4 weeks ago