Skip to content
Grav 2.1 is out: every page speaks Markdown. Read the announcement →

Using 2 themes for one site

Started by Mario Lacunza 8 years ago · 3 replies · 805 views
8 years ago

Hi,
Im new with GRAV, I have a question for themes: so I want to use theme1 for the most part of the pages in the website (frontpage, contact, blog, etc), but for the Manual/Docs link I want to use the Learn2 theme is this possible? how can I do that?

8 years ago

@mlacunza Just a wild guess....

A theme/plugin can use the Asset Manager to addCss and removeCss. Maybe, by checking the url requested by the user, you can add/remove css depending on the url.

Never tried it, but it might be doable...

Some pseudocode:

PHP
$path = $this->grav['uri']->path();

if ($path startswith '/docs') {
  // addCss('my docs css file');
} else {
  // addCss('my regular css file');
}

Again, never tried it, but this comes first to mind...

Suggested topics

Topic Participants Replies Views Activity
Themes & Styling · by stuart young, 1 month ago
3 441 1 month ago
Themes & Styling · by Sebadamus, 1 month ago
5 457 1 month ago
Themes & Styling · by martynfoster735, 2 months ago
1 442 2 months ago
Themes & Styling · by Justin Young, 2 months ago
1 466 2 months ago
Themes & Styling · by Slebeig, 3 months ago
4 594 3 months ago