I can change the active theme from the management dashboard in OctoberCMS by going to Settings/Front-end theme. Now I want to give the end-users the ability to change the theme by clicking on an icon. How can I change the theme programatically on the server side? I could not find the relevant code in the documents.
Asked
Active
Viewed 945 times
0
-
Would you like to allow each end-user to choose their own theme (user after logging in sees chosen theme, not the default one). Or just allow user to change the global theme? – rsobon Apr 04 '16 at 08:40
-
@rsobon I want to let them choose their own theme. – B Faley Apr 04 '16 at 09:03
1 Answers
3
CLI command of enabling some theme is:
php artisan theme:use rainlab-vanilla
It means that you can call php code something like that:
Artisan::call('theme:use', ['rainlab-vanilla'])

Shynggys Kengessov
- 359
- 2
- 12