I have a data template article which inherit another data template Metadata. I have applied a rendering to standard value of template Metadata to render metadata on the page where it is inherited. The reason for doing so is that i do not want to apply the same rendering again everywhere I have inherited the Metadata template. Is there a way to achieve this or do I have to apply the rendering to each inheriting template.
1 Answer
I would not recommend trying multi-tier rendering inheritance. I've seen several places that tried setting it up, and it failed every time (and is not meant to be used like that).
I believe it theoretically works if you do a bottom up approach every time you do this, so if C derives from B and B derives from A. You would set A first, then B, then C. IF you needed to change anything from A, you would the need to reset B and C and configure them from scratch, which kind of defeats the purpose.
Basically what I'm getting at, only set standardvalue renderings on "Page instance"- and not "interface"-templates.
-
Thanks, does that mean you are suggesting that instead of inheritance,as a best practise, I should be providing the rendering on individual templates Commented Sep 14, 2017 at 7:23
-
Yes, that's exactly right. You should be providing them on individual templates and subsequently inheriting them on the item instances of those templates. I would say that the only exceptions to this rule are very basic bits of presentation that will apply to all templates with minimal likelihood of change, e.g. Layout, Header and Footer. I typically set those on a base page template and if things do change later on I make the changes on each individual inheriting page template, only. This is just to save time during development. Like @M.Engel said, that is bottom-up. Commented Sep 14, 2017 at 12:46