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

Which twig template

Started by Richard Hainsworth 8 years ago · 1 replies · 550 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 jean-louis67, 3 weeks ago
2 308 3 weeks ago
General · by Andy Miller, 3 weeks ago
0 310 3 weeks ago
General · by Veehem, 4 weeks ago
0 263 4 weeks ago
General · by milkboy, 4 weeks ago
0 264 4 weeks ago
General · by ian russell, 1 month ago
2 335 1 month ago