0

we are investigating the sxa possibilities. For this we try to migrate our old navigation module into sxa. We have many sites in a multi site/tenant environment.

So that we could use the module within all sites/tenants, it should be a feature module.

It would be good, if we could participate to the rendering variants of the sxa default navigation. Variant Field

Where in our module we could reference the rendering variants of the standard sxa navigation module?

If we configure our own rendering variant, then its selectable... Site Setup

When we try to use the default rendering variant, the Variant field is empty and has no entries.

Thanks a lot

1

When you will create a new site, you will have all of the Rendering Variants defined under your Site, here:

enter image description here

We have also a few "global" variants which are here: /sitecore/system/Settings/Foundation/Experience Accelerator/Rendering Variants/Rendering Variants but in general you should use your own one. So the one which will be auto-created in the site creation process and the one you will later on design and create under the site.

Do not create custom variants in the "global" location because:

  • this is not how it should be done - Rendering Variants are in general per site but of course, you can use Shared Sites feature.
  • if you really want, create "global" ones but you will lose all of them with the SXA upgrade (as the root is the SXA item and we will override it).

One more thing... On your images, I see that you are trying to configure Rendering Variant in the Site Setup scaffolding step. Site variants are not created yet at that moment (as there is no site yet) so you can't pick up them.

2
  • I know where the folder "Rendering Variants" is located. What I want to know is, where is the reference from the Variant Field (the upper image in the question above) to the Rendering Variants Folder. (the image in your answer) So that I could perhaps reference my navigation module to the Navigation Rendering Variants of the SXA. Jan 20 '20 at 8:12
  • There is no hard reference. We have a logic which is picking up available Rendering Variants for the component. Look closer and you will see that the field in the Control Properties of a component is using code data source: code:Sitecore.XA.Foundation.Variants.Abstractions.DataSource.AvailableRenderingVariants, Sitecore.XA.Foundation.Variants.Abstractions Jan 20 '20 at 12:27
0

Rendering Variants are created under the path: /sitecore/content/[Your tenant]/[Your site]/Presentation/Rendering Variants/[Feature name].

As you are looking to modify/add rendering variants to Navigation component, the path should be /sitecore/content/[Your tenant]/[Your site]/Presentation/Rendering Variants/Navigation as shown below:

enter image description here

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.