3

I have a base template called Base Page which has a few renderings on it in the standard values that all pages should have. I have a bunch of templates inheriting from Base Page that also have a standard values item with renderings specifically for pages created from that template.

When I need to change the ordering of renderings on Base Page standard values, or delete/add renderings, how can I make it so that all inheriting templates update? Right now they don't. It seems like going to each and clicking Reset isn't a solution since that will erase the custom rendering selections for that template type.

Is there any out of the box way to do this, or will I have to use a PS script to iterate through all the template standard values?

P.S.: Is this poor design/architecture? Let me know since I am looking to improve. Thanks!

3

Why does Standard Values inheritance break?

Inheritance of Standard Values works until the field does not change on the item itself. So if you have filled the Standard Values in Final Renderings field the inheriting stops when the created item Final Layout changes (adding/removing/changing renderings to the page).

What you could do better?

In short, fill the Shared Layout (__Layout) field in Standard Values. This only works if you could use the same renderings for each language on the items.

Similar question where you could find the answer: Template standard values final layout

Here is a PS script which could help you: Best way to add rendering in base template and inherit

  • Ok, interesting. I am not modifying the final layout at all, only shared layout (on Base Page template, inheriting page templates, and the pages themselves). I just want to make sure of one thing: When I change Base Page, inheriting templates are not supposed to update (assuming I only update Shared Layout)? – Paul Dec 5 '18 at 17:40
  • @Paul the inheriting template standard values should be also updated if you did not change it. Do you see the Standard value remark next to the Shared Layout field on the inheriting templates? If not, try to reset the field then on the inheriting templates. – Tamás Tárnok Dec 5 '18 at 20:57
  • So, because my inherting template standard values has a custom set of renderings, that means it's working by design. I can't reset the field on inheriting templates since that would break all the pages (they would lose the custom set of renderings they should have and instead just have the renderings on Base Page). Good to know there's no other way to do this than with a script. I'll accept your answer now. – Paul Dec 7 '18 at 22:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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