andrewandante / silverstripe-theme-picker
Adds a theme dropdown to SiteConfig.
Installs: 706
Dependents: 0
Suggesters: 0
Security: 0
Stars: 3
Watchers: 5
Forks: 1
Open Issues: 0
Type:silverstripe-vendormodule
Requires
- php: >=5.6.0
- silverstripe/framework: ^4
- silverstripe/siteconfig: ^4
This package is auto-updated.
Last update: 2025-01-29 05:50:05 UTC
README
Module to replicate the SS3 dropdown for themes in SS4.
Requirements
- SS4
- SiteConfig
Installation
composer require andrewandante/silverstripe-theme-picker
Config
This generates the dropdown from the SSViewer::themes()
- so any theme you'd like to be selectable needs to be first present in something.yml
.
SilverStripe\View\SSViewer: themes: - 'simple' - 'complicated' - '$default'
Will result in the dropdown options 'simple' and 'complicated'.
Caveats
- Currently hooks onto
PageController
. - Hooks out the theme from the list and sticks it at the top.