Sitecore tip 27 – tune where SXA Rendering Variants can be used with the ‘Allowed in templates’​ option

Did you ever see the Allowed in templates field when creating new rendering variants in Sitecore Experience Accelerator? It can be used to configure on which data templates the Rendering Variant is allowed. So make no mistake, these are nog the page designs! Sometimes people call page designs templates as well and although I understand this you will get confused when looking at features like this one.

With the Allowed in templates option you can make sure that certain rendering variants can only be used on certain data templates. So for example, if a specific news list rendering variant can only be used on a news overview page you need to create a data template for the overview page to assign it. And to make it more monkey proof you can create a page design for this specific data template as well.


So why would you even bother using this option? Well, because you can prevent long lists of rendering variants your end users can choose from. And because you want to prevent the usage of wrong rendering variants that can mess up the layout because of ‘wrong’ HTML on the ‘wrong’ place. The larger your sites and SXA environment will be, the more rendering variants you will probably have and the more you will crave for tailor made configurations. Options like this can help you doing so.