1

I'm working to create a clone of the Carousel Composite component. I've been able to update the Datasource and Rendering parameter templates for my use cases. However, I'm unable to change the rendering variant that is stored on the Slide item template. I'm also having trouble finding where the query:$template query is being resolved for the values being stored in the source field of the Multilist field on the IVariantDefinition template located here, /sitecore/templates/Foundation/Experience Accelerator/Variants/IVariantDefinition.

I tried to follow some steps in a post that provided some insight into how things are assembled here: How to Create a Variant of a Composite Rendering that Rich Seal provided, but I may have missed something. In this answer, there's a second option that talks about adding an updated variant to the OOTB /System/Settings/Foundation/Experience Accelerator/Rendering Variants/Rendering Variants/Page Content/Slide variant and then changing the location after you're able to select your updated variant in the Presentation Details.

I moved my variant into the default SXA location above and was indeed able to pick it from the variant drop-down in the presentation details for the Page Content rendering. Once I picked my rendering variant and saved it, I moved it to the location in /System/Settings/Foundation/My Tenant/Rendering Variants/Rendering Variants/Page Content/Slide. Once I moved the Variant, I went back to the Slide Item template Standard Values, Presentation Detail, Variant drop-down, and it was the GUID of my Rendering Variant, and no longer the name. I understand that for some reason the source is not able to resolve my custom location. I don't understand why yet.

So my questions are two-fold:

  1. What is controlling the Variants that are allowed on the Page Content rendering stored on the standard values for the slide item?
  2. On the Variant template, there is an allowed templates multi-list, in the source field of the multi-list, the value is query:$templates. What controls what that query is resolving, and how can I add my new templates to it as required?

1 Answer 1

1

I can at least answer part two of your question, as I had to update that myself. At least on v9.3, the source query for the "Allowed in templates" field is query:$templates|$rvSystemTemplates Specifically, $rvSystemTemplates is driven by configuration. You can add the following config file to get your templates to show up in the list

<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/" xmlns:set="http://www.sitecore.net/xmlconfig/set/">
    <sitecore>
        <experienceAccelerator>
            <renderingVariants>
                <allowedTemplates>
                    <template name="Cloned Slide Item">{AB416BB3-2DE9-4AA7-8CDD-B6DE11A485E7}</template>
                </allowedTemplates>
                <systemTemplates>
                    <template name="Cloned">{AB416BB3-2DE9-4AA7-8CDD-B6DE11A485E7}</tempalte>
                </systemTemplates>
            </renderingVariants>
        </experienceAccelerator>
    </sitecore>
</configuration>

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.