Skip to content
● Meet Grav Guard: keep every Grav site you run secure and up to date, all from one place. Free for up to 3 sites. Read more →

Nudge in the right direction for sub theme

Started by Darryll DeCoster 9 years ago · 1 replies · 1041 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 David Garner, 5 years ago
15 1136 3 days ago
Themes & Styling · by MarkP, 3 weeks ago
3 219 2 weeks ago
Themes & Styling · by TomW, 3 weeks ago
0 136 3 weeks ago
Themes & Styling · by themetman, 4 weeks ago
1 230 3 weeks ago
Themes & Styling · by AH, 1 month ago
1 355 3 weeks ago