Skip to content
● Critical PHP security fixes are out: update PHP on your Grav sites. What to do →

Nudge in the right direction for sub theme

Started by Darryll DeCoster 9 years ago · 1 replies · 936 views
9 years ago

I think I get the idea of theme inheritance, but I'm a little lost as to where to start. Basically I have a modular, one page site that uses theme A, and I want to have 1 page that uses theme B. I need to have a different page structure too, so I have to change the base.html.twig.

How do I get this one page to use the new template? Do I just create an alternate base template and then just extend the template file to use the new base file like this?
{% extends 'partials/base.html.twig' %}

9 years ago

Sounds very good. But then you need a second modular-b template as well that extends the base-b-template. (Maybe you can define the base layout via header).

Suggested topics

Topic Participants Replies Views Activity
Themes & Styling · by FrViPofm, 1 month ago
4 554 4 weeks ago
Themes & Styling · by johan thomas, 5 years ago
1 869 1 month ago
Themes & Styling · by stuart young, 3 months ago
3 730 2 months ago
Themes & Styling · by Sebadamus, 3 months ago
5 751 3 months ago
Themes & Styling · by martynfoster735, 3 months ago
1 700 3 months ago