2

Is there a way to specify default rendering variant?

We are planning to create 2 custom rendering variants for Promo component for one site and want to set one of these custom variants as default for that Promo component on that site so content editors don't need to choose it everytime component is added to page.

  • I think (not 100% sure) that the first one is the list is the default. So not necessarily the one called "default" ;) – Gatogordo Sep 21 '18 at 15:02
3

I did a quick test on SXA 1.7.1 and in that version the default is indeed the first one in the list of variants.

If you change nothing, it will be the first one alphabetically. But you can reorder them in Sitecore (just like all items) and that order is taken into account. So by changing the order you can change the default.

Small tip: be aware when you create a new variant that gets on top (e.g. because it starts with 'a') you just created a new default variant. That might have some serious impact on existing content..

| improve this answer | |

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.