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.

1
  • 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, 2018 at 15:02

1 Answer 1

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..

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.