-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Theme per page #3082
Comments
The main issue I see with multiple themes is that the page types may be radically different from theme to theme. So it's not enough to set the theme, but you really need to have a setting that picks page type together with theme. Something like Another big issue is in how Grav works right now, the theme gets loaded before routing. This would need to change in order to support the feature well enough. |
Do you have a list of existing issues to track this and possibly help on the underlying tasks? |
I don't think there's anything related to this -- it's just a known limitation of Grav. The only working way to work around of this, is to have a list of pages with assigned themes before the theme gets loaded. So basically routing should happen before theme initialization. |
I currently use a Grav instance with multiple pages and it happens that I would like a collection of pages (under a give directory) to use a different theme than the active one
I mean, really a different theme (or child theme), not just a new modular. This could be done using custom domains but it's not desirable either. I don't want to change the domain if it's about a dedicated section of the same site.
grav-plugin-themer does this and is quite simple (2 hooks, 3 functions) but:
There are three necessary things within this feature-request:
1.1. Insert and define a custom field to define the theme in use, eg
theme_override
theme_override
theme_override
The current status is:
<select>
. Having a custom "Add Modular/Page " button in the admin top bar, usingadd_modals
, would be better.normal
mode because the requested theme's blueprint are not loaded. This could be fixed in the admin plugin, but some core support (or at least an implicit support or a standardization) would be welcome.Overall that's a great feature that could find its way in core without much disruption and would, by standardizing the YAML key defining per-page theme, lead to better support from the admin plugin.
@Sommerregen
The text was updated successfully, but these errors were encountered: