Next 5.3 (almost) feature I’m putting my eye on is multiple template inheritance. It looks like a small UI fix, leading to very cool aspect-like stuff.
Notice how ‘base template’ field of every template allows adding multiple templates. Inheriting from more than one template means inheriting union of their fields, simply enough. Sitecore is also first to use the feature: instead of containing all the sections directly, standard template now inherits from multiple base templates (all defined at /sitecore/templates/system/templates/sections), each containing one particular section.
Standard template inherits each section from separate templates.
Also notice the ‘treelist’ field bundled with Sitecore.That’s probably the only example needed to get excited. From solution perspective, it is really easy to create own aggregations, design ‘aspects’ and mix them as appropriate to create concrete templates. It can be sets of common content fields, meta-data or smaller things like image links. If some of the solution item kinds are designed to have graphical links, you can group ‘image’, ‘link’ and ‘text’ fields together and mix it in as base template when needed.
For module vendors it means that there’s no need to feel guilty about extending standard template any longer. It is often really tempting to have your module add new fields to some of the items.
RSS Module, for instance, can benefit from having fields controlling feed generation for content items. 5.1-compatible version has ‘Rss Settings Base’ template and instructs user to inherit their template from it. This obviously gets a little more complicated when there’s a lot of existing inheritance in solution. In 5.3 it is possible to either mix base rss template into default template to add rss-specific fields to all items, or decide which of your templates should have that section and add it individually.
And no need to worry about accidentally mixing the same fields twice – this multiple inheritance is a safe one.