3

I created a custom variant component following this guide. I couldn't find the "Component Variant" selection of my custom variant component in Experience Editor.

Is there any additional configuration required to enable component variant selection (apart from inheriting Variant Controller)

2 Answers 2

1

Did you create rendering parameters for your custom component?

The rendering parameter template for your component should inherit from /sitecore/templates/Foundation/Experience Accelerator/Rendering Variants/Rendering Parameters/IComponentVariant (don't forget to also inherit /sitecore/templates/System/Layout/Rendering Parameters/Standard Rendering Parameters instead of the Standard Template).

enter image description here

Using this base template will give you the variants dropdown in the rendering properties. By the way, SXA has a similar base template for Styling (/sitecore/templates/Foundation/Experience Accelerator/Presentation/Rendering Parameters/IStyling).

https://ggullentops.blogspot.com/2017/03/variants-sxa-sitecore-rendering.html

0

I had this issue with SXA today too and the component was not using custom rendering parameters so it wasn't that. I ended up having to re-install SXA for Sitecore 9.3 locally and it fixed it and the variants showed up fine.

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.