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

Using 2 themes for one site

Started by Mario Lacunza 8 years ago · 3 replies · 609 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 Pedro M, 2 months ago
4 193 2 months ago
Themes & Styling · by Ian, 2 months ago
3 90 2 months ago
Themes & Styling · by Norbert, 2 years ago
11 449 3 months ago
Themes & Styling · by Lukáš Findeis, 3 months ago
0 43 3 months ago
Themes & Styling · by Sebadamus, 4 months ago
5 123 3 months ago