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

Theme Inheritance for modular in Antimatter?

Started by Muut Archive 11 years ago · 3 replies · 320 views
11 years ago

Hi there,
I'm trying to setup a website (actually I'm switching from WordPress) and word with theme inheritance. I have a modular home page, a blog and some pages.
Now I'm stuck with changing the modular sections with theme inheritance... If I copy the files of the modular directory into my new theme and change something (e.g. the showcase image color), nothing happens. I tried to copy the modular.html.twig as well, but still nothing.
Is there any workaround for that?

11 years ago

Did you disable twig caching? Is that the only twig file not being overridden by the child theme?

11 years ago

Thanks! Disabling Twig Caching helps. Even if I put it on again. So, flushing the cache with CLI don't flush the Twig cache, right?

11 years ago

Changes to modular Twig templates is a little tricky currently. Either you have to turn off cache, or clear cache after making changes.

This is because the parent page (the one that contains the modular subpages) has cached the content, and it doesn't know the content has changed.

This is because only a twig template has changed and this typically does not impact content, only in a modular page made of modular subpages, changing a twig template does impact the total page content.

This is something I would like to fix in a future version of Grav.

Suggested topics

Topic Participants Replies Views Activity
Archive · by Deleted User, 9 years ago
0 1349 9 years ago
Archive · by Muut Archive, 9 years ago
2 934 9 years ago
Archive · by Muut Archive, 9 years ago
2 4060 9 years ago
Archive · by Muut Archive, 9 years ago
1 2946 9 years ago
Archive · by Muut Archive, 9 years ago
3 1117 9 years ago