5

My question is the same as previously asked here with no answer. We have a bunch of page templates with same header/footer, etc. The idea was to create a base template which would contain all of the renderings related to header and footer, and for all of the pages to inherit from this template dynamically, but I ran into some issues with the implementation.

I.e. I created the required base template A which contains rendering a in the presentation details of its Standard Values item. Then this template B inherits from A and includes an additional rendering b (also in the presentation details of its Standard Values item). I expect pages based on B to contain both a and b's content. However, when I edit A, i.e remove a or change its settings, there's no changes in B (unless I regenerate the presentation details of B's Standard Values item, which is something I want to avoid as it also purges b and all its configuration).

Is there a way to make this inheritance relationship more dynamic? or maybe altogether a better approach to template inheritance?

4
  • What version of Sitecore?
    – Chris Auer
    Dec 14, 2016 at 20:03
  • @dnstommy 8.2 rev. 160729
    – Elena P
    Dec 14, 2016 at 20:09
  • Are you putting all the presentation details in the Shared Tab on the STD values for A? If you use the Final Tab on A, anything that happens on B, and its children, is locked in stone.
    – Chris Auer
    Dec 14, 2016 at 20:28
  • @dnstommy I'm using Shared Tab for both A and B
    – Elena P
    Dec 16, 2016 at 8:48

1 Answer 1

2

Because Sitecore templates can inherit from multiple base templates, layout deltas cannot be used in a sensible way as they can be between a template and a page item. So Sitecore lets a standard value come through a base template, but I'm not sure how it chooses which value to use if more than one base template standard values has their own presentation settings. If you edit the presentation settings on a template, it first copies the value that it is inheriting and breaks the association to the standard value.

This problem has been addressed in several different ways. The Sitecore Experience Accellerator has Composite Renderings, Partial Designs and Page Designs. Other accellerators have implemented Placeholder Fallback. I created a project called Base Layouts. The common theme with all of these different solutions is that presentation settings are moved away from the template standard values.

1
  • Thank you! It was indeed very helpful to hear everything is indeed functioning as intended. I will look into using the solutions you suggested / maybe into writing a PSh script to sync the renderings between A & B.
    – Elena P
    Dec 16, 2016 at 8:47

Your Answer

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

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