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?
Did you disable twig caching? Is that the only twig file not being overridden by the child theme?
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?
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.