Using \Config::set vs \Config::save
Permalink
I can override the system login page using:
The docs athttps://documentation.concrete5.org/developers/packages/storing-conf... say I should be able to use \Config::set to override at runtime but this does not work. It's a pain because \Config::clear doesn't erase the save'd value when run in a package uninstall because that uses 'set' - you have to manually delete the app.php file that was created.
Anyone know why, is this a bug? It would be much better to use \Config::set in the controller's on_start and never muck about with the filesystem.
\Config::save('app.theme_paths./login', ['theme_name']);
The docs athttps://documentation.concrete5.org/developers/packages/storing-conf... say I should be able to use \Config::set to override at runtime but this does not work. It's a pain because \Config::clear doesn't erase the save'd value when run in a package uninstall because that uses 'set' - you have to manually delete the app.php file that was created.
Anyone know why, is this a bug? It would be much better to use \Config::set in the controller's on_start and never muck about with the filesystem.
Use in your package's on_start() method to dynamically overwrite the theme used for single pages (or any other page).
Thanks for that... and for e.g. /dash/board/welcome I need the filepath /dashboard/welcome under my theme dir?
I think that should work. But that just changes the theme, overwriting the actual template would require a different approach.
If you go to /concrete/src/Page/Single.php and look at the getThemeableCorePages() method you'll see which page templates you can override by providing templates in your theme folder.
If you go to /concrete/src/Page/Single.php and look at the getThemeableCorePages() method you'll see which page templates you can override by providing templates in your theme folder.