This plugin enables you use different themes on one site individual set per page or collection.
With Themer
you will get the freedom to change the theme by setting the theme
variable in the header of a page or collection:
theme: my-theme
Theme variables are being inherited from parent pages. Thus without any doing, pages from collections are automatically styled with the same theme. Further you have the possibility to reset the theme to the default value (defined in the system.yaml
configuration) by finally using the command
theme: @default
Installing or updating the Themer
plugin can be done in one of two ways. Using the GPM (Grav Package Manager) installation update method or (i.e. bin/gpm install themer
) manual install by downloading this plugin and extracting all plugin files to
user/plugins/themer
For more informations, please check the Installation and update guide.
The Themer
plugin comes with some sensible default configuration, that are pretty self explanatory:
# Global plugin configurations
enabled: true # Set to false to disable this plugin completely
# Default options for Themer configuration
templates: '' # Default theme templates to show in admin panel
# (leave empty to show all page templates)
If you need to change any value, then the best process is to copy the themer.yaml file into your users/config/plugins/
folder (create it if it doesn't exist), and then modify there. This will override the default settings.
If you want to alter the settings for one or a few pages only, you can do so by adding page specific configurations into your page headers, e.g.
themer: false
to disable the Themer
plugin just for this page,
theme: my-theme
to assign an individual theme to the page or collection or
theme: @default
to reset the theme variable and fall back to the default theme defined in the system.yaml
configuration.
You can contribute at any time! Before opening any issue, please search for existing issues and review the guidelines for contributing.
After that please note:
If you like my project, feel free to support me via or by sending me some bitcoins to 1HQdy5aBzNKNvqspiLvcmzigCq7doGfLM4.
Thanks!
Copyright (c) 2015-2016 Benjamin Regler. See also the list of contributors who participated in this project.
Dual-licensed for use under the terms of the MIT or GPLv3 licenses.