Skip to content

Hounddd/wn-themeswitcher-plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Theme Switcher

ThemeSwitcher Plugin

Demo any theme installed in Winter CMS by visiting a defined URL.

Installation

Let assume you're in the root of your wintercms installation

Using composer

Just run this command

composer require hounddd/wn-themswitcher-plugin

Clone

Clone this repo into your winter plugins folder.

cd plugins
mkdir hounddd && cd hounddd
git clone https://github.com/Hounddd/wn-themeswitcher-plugin themeswitcher

Note: In both cases, run php artisan winter:up command to run plugin's migrations or logout and login backend.

Usage

Visit the followinf urls

  • To demo a theme : /theme-switcher/use/theme-name, where theme-name is one of your website themes.
  • To restore default theme : /theme-switcher/restore

Config

By default, switching theme is limited to authenticated administrators.
To authorise all visitors to switch to another theme, create a config file /config/hounddd/themeswitcher.php and set onlyBackendUsers to false:

<?php

return [
    'onlyBackendUsers' => false,
];

For more help see Winter documentation related to file-based configuration.

🏆 Credits

Inspired by Flynsarmy.ThemeSelecter


Make awesome sites with ❄ WinterCMS!

About

Preview theme plugin for Winter CMS

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages