Using 2 themes for one site


#1

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?


#2

@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:

$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…


#3

Thanks! but I found this plugin: Themer


#5

and is not that what I have done?