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?

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.

  • 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 – Manideep Yechuri Aug 28 '18 at 7:05

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.