6

As SXA is supporting placeholder settings for different renderings, Is there any way that we can setup placeholder settings for rendering variants too for a single rendering?

1 Answer 1

4

welcome to SSE.

The short answer is, yes you can. Here is the reference material: https://doc.sitecore.net/sitecore_experience_accelerator/building_the_layout/renderings/add_a_dynamic_placeholder_to_a_rendering_variant

The longer answer:

  • Add a placeholder to your rendering variant and add the Placeholder Key value. Make sure you do not add a dash to the key name
  • Go to your placeholder settings for your site <siteroot>/Presentation/Placeholder Settings and add a placeholder
  • In the Data section enter the Placeholder Key you just added into your rendering variant and suffix it with * to make it dynamic. So if your key was MyRenderingVariantPlaceholder, you would enter MyRenderingVariantPlaceholder*

Now you can restrict the use of renderings by using the allows controls field like you would in other Placeholder Settings.

1
  • Thanks for the response @Richard. But what if we have already created a placeholder in Partial design and need to restrict a particular rendering variant of a component in that placeholder. Thanks Aug 28, 2018 at 7:05

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.