Sean Holmesby

.NET and Sitecore Developer

By

Presentation Details Changes in Sitecore 8 – How Renderings are Stored with Versioned Layouts

Sitecore 8 has changed the way renderings on a page are stored on an item. A page’s full presentation can now be updated (hopefully through the Experience Editor) for an individual version…meaning those changes can go through workflow to be approved. It also means layout changes can be rolled back to previous versions easily.

Note: Screenshots and investigation for this post has been done using the Sitecore 8 Technical Preview handed to Sitecore MVPs. The final result may change for the initial release of Sitecore 8.

So how did an item’s layout previously work?

The Shared __Renderings Field

While Page Editor (now the Experience Editor) has been great, it lacked the ability to send presentation details through Workflow because the page layout was saved in the __Renderings field on the item….which is a Shared field.
This means that the renderings were shared across all languages and versions… Yep….Shared… that’s why it couldn’t go through Workflow…. once updated, it would be updated across ALL versions, not just the most recent one.

The Rendering Delta

Further to that, an item’s renderings would be based off it’s template’s Standard Values. Any changes made would then be stored on that item as a rendering delta, which represented the difference between itself and the standard value.
The final result was it’s template’s Standard Values, with the rendering delta applied on top of it.

Here, in previous versions of Sitecore, I’ve added an extra ‘Sample Rendering’ to the bottom for this item.
01 - Added Rendering
The resulting delta is stored on the item like this.
02 - Added Rendering Delta XML

How does Sitecore 8 change this?

Attendees at the Sitecore Symposiums witnessed the UI changes for presentation details in Sitecore 8. The Presentation -> Details dialog now has two tabs…Shared Layout, and Final Layout.
03 - Sitecore8 Renderings Tabs
So an item will have the ability to define presentation details that exist across all versions (Shared – as it has worked in previous versions), as well as the ability to change the presentation details specific to the current version.
When combined with the Shared details the result is what’s shown on the ‘Final’ tab.
04 - Sitecore8 Renderings Tabs - Final

But how and where is this stored?

Sitecore 8 keeps the existing __Renderings field….still Shared…. but now adds a __Final Renderings (not-Shared) to the Standard Template.
This __Final Renderings field stores another rendering delta value, but this one describes the difference between the versioned presentation details and the shared presentation details.
05 - Changed Final Layout Final Renderings Field raw values

Here is the delta….a little more readable.
07 - Changed Final Layout Final Renderings Field

From this delta, you can see that I’ve deleted the ‘Sample Sublayout’ ({43222D12-08C9-453B-AE96-D406EBB95126}), and changed the ‘Sample Inner Sublayout’ ({CF044AD9-0332-407A-ABDE-587214A2C808}) placeholder to ‘main’.

The result is the ‘Final Layout’ View
06 - Changed Final Layout

Putting it all together.

Now Sitecore 8 has two delta values that need to be applied, meaning the delta needs to be applied in layers.
The final presentation details for an item is built up from:-

  1. Presentation on Template Standard Values
  2. Rendering Delta on Shared ‘__Renderings’ field
  3. Rendering Delta on Versions ‘__Final Renderings’ field

The complete set is what we see on the Final Layout tab in the presentation details dialog (shown above), and what we see on the complete page when it’s rendered.

6 Responses to Presentation Details Changes in Sitecore 8 – How Renderings are Stored with Versioned Layouts

  1. Matt Gartman says:

    Nice to see that Sitecore has finally addressed this issue. I suppose for those of us who can’t upgrade to 7.5/8 easily due to the requirement of having MongoDB (a really hard sell for larger enterprise shops) that we’ll just have to stick to unsharing the rendering field to get Workflow on changes to Presentation.

  2. Joe Bissol says:

    Hey Matt Gartman-
    I have a promise from Tim Ward that he is going to get me info on a supported process that Sitecore has to make presentation details versioned that works starting in 7.2. If I hear anything I’ll try and publicize it. (I’ll test and make sure it doesn’t break the upgrade process first though)

  3. That’s why we lead with the Experience Cloud and suggest that customers run their Experience Database there. 🙂

  4. Ronald says:

    Nice Sean, looking forward to this feature.

  5. Matt Gartman says:

    @JoeBissol I’ll keep an eye out for this! Thanks!

Leave a Reply

Your email address will not be published. Required fields are marked *