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

Community guidelines

Please keep discussions civil and on-topic. Repeated violations may lead to a temporary ban.

Themes & Styling

Nudge in the right direction for sub theme

Started by Darryll DeCoster 9 years ago · 1 replies · 479 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 Pedro M, 2 months ago
4 196 2 months ago
Themes & Styling · by Ian, 2 months ago
3 92 2 months ago
Themes & Styling · by Norbert, 2 years ago
11 454 3 months ago
Themes & Styling · by Lukáš Findeis, 3 months ago
0 47 3 months ago
Themes & Styling · by Sebadamus, 4 months ago
5 126 3 months ago