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.

General

Which twig template

Started by Richard Hainsworth 8 years ago · 1 replies · 443 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 Jerry Hunt, 4 days ago
2 82 12 hours ago
General · by pamtbaau, 17 hours ago
1 55 17 hours ago
General · by Andy Miller, 1 day ago
0 45 1 day ago
General · by Marcel, 12 months ago
6 348 5 days ago
General · by Duc , 5 days ago
3 43 5 days ago