8

I am using the Sitecore 8.2

I have a template T1 which has rendering R1 set on its Standard Values (set a long time ago, maybe at the age of Sitecore 7 or earlier).

There is a set of templates T2, T3, etc. which inherit presentation details from the T1 standard values + each of them has some additional renderings assigned to their Standard Values.

I noticed that if I update a placeholder name of R1 on the T1 standard values, it is not populated to the rest of the inherited templates.

Is that an expected behavior?

What would be your suggestion on updating all of the template's placeholders for R1?

1
  • 1
    If such changes happens rarely, you could use SPE (Sitecore Powershell Extentions) to script the change to all your templates standard values item. Commented Aug 4, 2017 at 11:29

1 Answer 1

6

By default, Sitecore doesn't support rendering inheritance for templates standard value items.

When you created T2 and T3 standard values items, the __Rendering and __Final Rendering field values were copied from T1, not inherited. That's why modifying the rendering of T1 standard values doesn't affect T2 and T3 standard values rendering.

There are a couple of blog posts with workarounds to get the desired behavior using layout deltas (also called patches). Here's one of them: https://www.cognifide.com/our-blogs/sitecore/complex-layouts-in-sitecore-using-standard-values-hierarchy/

The idea is to attach to the item saved event, monitor standard values items changes, and modify what is about to be saved for the __Rendering and __Final Rendering field values. The original value would be a copy of the base template field plus the changes that were done. You have to calculate the delta between this value and the base template field value. Then store this delta in the field instead.

3
  • You can vote for Sitecore to support rendering inheritance in the future: sitecorecommunity.uservoice.com/forums/… Commented Aug 4, 2017 at 11:32
  • Thank you! I remember facing this a while ago, but couldn't recall. Will definitely vote for this feature. Commented Aug 6, 2017 at 7:00
  • 1
    Link is now broken, and this is the main reason why it is always recommended to post relevant parts of the link on the answer here.
    – jammykam
    Commented Apr 23, 2021 at 15:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.