Problem/Motivation
Currently if a Entity is individually overriden and customised using Layout Builder, it is at risk of becoming completely out of sync with the default layout of the Entity Type/Bundle as a whole.
Later in time if one decides to change the layout of the Entity Type/Bundle from the Manage Display Layout Builder UI, the changes don't reflect to the individually overriden Entities. This is not an issue if there is only a couple of landing pages, but a huge maintainability issue if Layout Builder is used for something like articles which have sidebars and when something in the sidebar needs to change.
Proposed resolution
One way out of this problem could be to have some Sections of the Layout be locked and not available for editing when the individual Entities being customised. For example have the option to lock the sidebar Section and only have the middle content section be available for editing.
Remaining tasks
Determine best approach and whether this is best suited for Contrib or Core.
Comments
Comment #2
bkosborneWell, even if you locked down certain sections in a layout, what if you decide to change the entire default layout (and thus section placement)? that section that you locked down and the section you allowed to be overwritten by individual nodes may no longer exist. I don't see how you could possibly merge those changes gracefully for each overridden node.
Why not just disable overrides for content types where you may alter the layout? What's the use case for allowing layout overrides for individual nodes for that content type?
Comment #3
mikey en commented@bkosborne
The main idea behind this feature request is to have a section which is always same for all the nodes in that content type, whether its overridden or not. I think the main Idea behind content types is to have some level of coherency for the nodes among other things. Having a section locked down for the content type as a whole and which is same across all the nodes under that content type will help achieve that IMHO.
"What's the use case for allowing layout overrides for individual nodes for that content type?"
Lets say we have a sidebar section which designed in the layout builder, things change and lets say we need to change something for the sidebar for all the nodes of the content type. For that to happen in the current scheme of things we would need to change it for the content type in the manage display page and also for all the overridden pages as well, that to me looks like a lot of work if u have huge amount of overridden nodes. This is what i felt hard to do and had to resolve it in the theme templating.
The fact that the overridden node has no sense of belonging to any thing and is completely in itself works for a lot of use cases and likewise there will be use cases where its not needed at all.But if its used for the main articles nodes for a site I feel people need this lock down flexibility. This is just a use case, pretty sure people will come up with many if this option is provided :)
Comment #4
johnwebdev commentedWouldn't this feature be something that Page Manager could help you do, if it supported Layout Builder?
Comment #5
mikey en commented@johndevman , cant say about that. I started with Drupal8 + display suite.
Comment #6
aaronmchaleThis is an interesting issue, although I'm not sure which side I fall on, I could see why one would want this, but also why this might not be appropriate.
Another option is to initially develop this idea as a Contrib Module once #2942661: Sections should have third-party settings is in, since Sections having Third Party Settings could make this a lot easier to do in Contrib.
Also updated the IS and title as this is not a Node specific problem and applies to all Entities that use Layout Builder.
Comment #8
tim.plunkettComment #16
pyrello commentedJust adding an issue I closed early as related to this. I think this is a much more difficult problem to solve than is obvious based on using Layout Builder. Even once #3208766: Add UUID to sections gets done, it would be necessary to start tracking the original UUID that was overridden in addition to having one for the section that is replacing it. There is currently no way to replace a given section layout with another, so when that is necessary people will just create a new section with the correct layout and move blocks into it or recreate them. At that point, there is no way to track the new sections association with anything in the original section layout.