-
-
Notifications
You must be signed in to change notification settings - Fork 549
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[5.x] Add a config for specifying the default layout #11025
[5.x] Add a config for specifying the default layout #11025
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMO if this setting exists it should also be used wherever we already use layouts too, like in a collection.
cms/src/Entries/Collection.php
Line 445 in d864fac
return $layout ?? 'layout'; |
Cool. Time to grep ‘layout’. |
It's really just Collection@layout and Taxonomy@layout that have the string hardcoded. Change the config value and that should be good. |
Those are updated now. |
I moved the config into |
This PR adds a new config
statamic.routes.layout
that allow the default layout to be changed to something other thanlayout
. I've also set it to look for an .env variable (STATAMIC_FRONTEND_ROUTES_LAYOUT
).Our use is we have a site where the same codebase is shared across slightly different site versions and need to adapt the layout significantly per site - but other than that the codebase is the same.
If it helps make the case - Livewire allow the layout to be changed in a config.