Understanding how Sitecore treats content components across templates and individual items is a critical part of content author training. Used properly, Sitecore’s shared and final layouts can be leveraged by a user to effectively manage and vary content while still benefiting from the ability to have developers update templates.
Sitecore introduced versioned layouts in Sitecore 8 (so it is not that new), but for existing Sitecore customers that have just made the move to the 8 series or new customers the implications of this capability is not immediately apparent without some training.
In short, versioned layouts make it possible to specify different layouts for different versions and languages of the same item. You use versioned layouts when you want to:
- Have different layouts for different languages
- Publish a specific version with its own layout for a specific period.
There is a big scary flow diagram in this Sitecore article (https://doc.sitecore.net/sitecore_experience_platform/developing/developing_with_sitecore/versioned_layouts/versioned_layouts) that explains how it all works at a technical level. If you are a template developer, you should read this.
Content authors can access the different layouts in Experience Editor by using the layout button on the Presentation tab.
Selecting “Shared Layout” will show you the page with components that are common to all versions/languages. Selecting “Final Layout” will show you content components specific to the current version and language.
Adding versions and languages
When you add a new version of a page, i.e. you create version 5 from 4, all of the existing components are copied from the last version in the same language to the new version.
This is one of the first surprises: when you translate pages for the first time any content components that were on the Final Layout will not apply to the new language. This is by design. So, if you are building pages that will be translated to multiple languages down the road and they are to have the same components (but translated version of the content), edit in the page in “Shared” view.
When a developer updates a template, those changes are still applied to your pages, but keep in mind that:
So, some concrete examples.
- If a developer adds a new component to the template it will be added to your pages and display – provided you did not remove the component that contains the new component
- If a developer removes a component it will be removed from your pages no matter what
- If a developer updates the default content of a component, but you have changed it on your page, your page change remains
This is all to say, when making a change to a page think carefully about using Shared or Final or if perhaps it would be better to have the developer update the template.
Reverting to the template
There may be instances where you want to reassume the presentation as defined by the template. To do so, you can use the Reset button in the Presentation tab.
Compliance and accurate history
If you are using Sitecore to track versions of content and need each version to be an accurate representation of content that was presented to employees or customers at a point in time, then shared layout edit is something that an author should never do. The moment a shared layout edit is complete it affects all versions of content, including those in the past.