Skip to content
Grav 2.0 is officially stable. Read the announcement →
Themes & Styling

Nudge in the right direction for sub theme

Started by Darryll DeCoster 9 years ago · 1 replies · 541 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 Slebeig, 3 weeks ago
4 222 3 weeks ago
Themes & Styling · by Pedro M, 3 months ago
4 492 2 months ago
Themes & Styling · by Ian, 3 months ago
3 263 3 months ago
Themes & Styling · by Norbert, 2 years ago
11 649 3 months ago
Themes & Styling · by Lukáš Findeis, 3 months ago
0 202 3 months ago