1

Sitecore newbie here and I wanted to understand variants in Sitecore SXA, and Reading the rendering variants documentation,

(https://doc.sitecore.net/sitecore_experience_accelerator/building_the_layout/renderings/the_sxa_renderings_and_rendering_variants)

still did not help me understand why some components do not have default rendering variants like all the composites, the gallery and even the page content. where is the default variant and how and where is it connected to the rendering itself?

Also if i copy or clone a rendering, do i have to create a variant for it, or if possible can i make use of the original rendering's default variant and how?

1 Answer 1

5

Starting from the top:

  • Composites are complex renderings which are not using Rendering Variants. They can nest simple renderings like Page Content or Title which supports Rendering Variants. E.g.: Tab rendering has heading and content parts - in both you will find Page Content rendering.
  • You are configuring current Rendering Variant in the Control Properties dialogue (you can also use Variant Switcher drop-down but in fact, it's setting up the same property):

    enter image description here

  • If no variant is selected then first available is used as default one - thanks to this you will always see something when you drop rendering on the page (case when you forgot to select one)
  • When the rendering will be cloned the Rendering Variants are not copied but you can connect them to newly cloned rendering. Take a look at how Reusable renderings (Rich Text or Image) get's their Rendering Variants:

    enter image description here

  • SXA also contains "Global" Rendering Variants which are stored under this item: /sitecore/system/Settings/Foundation/Experience Accelerator/Rendering Variants/Rendering Variants. E.g.: Page Content is using them and that's why it's visible on the page even if it's doesn't have any Rendering Variant in newly created Site.

1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.