I understand that theoretically the Final layout is the versioned one of the layouts, what I don't understand is the behavior I get with making changes in the Experience Editor and how it seems to only seems to reflect a change in the Final layout, and then when I publish the item, the rendering doesn't show seemingly because it's not in the shared layout? It shows up fine in Experience Editor and in Preview mode. I'm very confused in terms of how to resolve these issues with renderings not showing in the published version, but they are visible in experience editor and whether I need to have these renderings exist in the shared layout. It seems that sometimes when renderings are created in Experience editor, they show up in both the shared and final layouts, but sometimes just the final. Can anyone help me understand why there seems to be inconsistent behavior with all of this? We only have one language version of the content if that matters.
Versioned layouts make it possible to specify different layouts for different versions and languages of the same item. In the Standard fields of a versioned item, in the Layout section, two fields are for layouts:
- __Renderings – a shared field where you specify the common layout for all languages and versions of the item.
- __Final Renderings – a versioned field where you specify individual layouts for languages and versions of the item.
See the below diagram to understand show it resolved from base template to Page Template and then Page item itself, Final Layout of the item will be rendered on the page -
See the below flow diagram shows in detail how Sitecore resolves which final layout to use for an item (reference):
As you already told that you understand it theoretically, but you are facing some issues while working with it. From your points and question here I am adding some points -
- The Final layout detail section will display the final combination of presentation details and combined the final view of renderings of the current version item.
If you are able to see the changes in Experience editor and Preview Mode, and after publish if those changes are not reflecting that you need to make sure that you are publishing related-items such as renderings etc as well as item version's workflow.
- Since both Shared and Final layout stores the values in "____Renderings" and "__Final Renderings" and its item level fields it means it will publish as well and there is nothing special in publishing.
- Final rendering is Shared+Final so if you are updating the Shared Layout in Experience editor it will be visible in both Shared and Final Layout but if you are updating the Final Layout in Experience editor it will be visible in Final Layout.
- If you have only one language, then it means you only need to think about the item versions only and it will be easy for you as well. If you want to update anything for all the item versions you can switch between Final to Shared Layout in Experience editor and can update there.
I hope the above points will give you all your answers but want to add some additional make sure points -
- Make sure the version you are previewing is in Final workflow before publish
- Make sure all the renderings are published from the layout section.
- Make sure which Layout you are updating in Experience editor