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
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 thePlaceholder Key
you just added into your rendering variant and suffix it with*
to make it dynamic. So if your key wasMyRenderingVariantPlaceholder
, you would enterMyRenderingVariantPlaceholder*
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 Commented Aug 28, 2018 at 7:05