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 · 1029 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 MarkP, 2 weeks ago
3 191 2 weeks ago
Themes & Styling · by TomW, 2 weeks ago
0 110 2 weeks ago
Themes & Styling · by themetman, 3 weeks ago
1 205 3 weeks ago
Themes & Styling · by AH, 1 month ago
1 323 3 weeks ago
Themes & Styling · by Bruno, 4 years ago
6 1522 3 weeks ago