Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

How to restrict components in a container having multiple parsys?

Avatar

Level 9

Hi Guys,

 

Say a container component has multiple parsys and the requirement here would be to use only some specific components to one of the parsys and the other parsys should allow all components.

sample example:

ManuMathew1994_0-1664621247469.png

 

Also is there a way to auto populate a default component on a parsys?

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

This is possible as well, you need to create a cq:template and add editconfig to restrict add or remove those component

View solution in original post

7 Replies

Avatar

Community Advisor

you can do it by creating of proxy of parsys where you want to restrict component and create a policy for that with allowed component.

Avatar

Correct answer by
Community Advisor

This is possible as well, you need to create a cq:template and add editconfig to restrict add or remove those component

Avatar

Level 9

@ManuMathew1994 

Hope this is useful

Define a design xml for the page template which might look something like the below xml , (the below xml is basically mocking the node structure of the page.

 

<?xml version="1.0" encoding="UTF-8"?>

<jcr:root xmlns:jcr="http://www.jcp.org/jcr/1.0"xmlns:nt="http://www.jcp.org/jcr/nt/1.0xmlns:sling="http://sling.apache.org/jcr/sling/1.0xmlns:cq="http://www.day.com/jcr/cq/1.0jcrpimaryType="nt:unstructured">

<par jcrprimaryType="nt:unstructured"
   sling:resourceType="/libs/foundation/components/parsys"
   components="[project/general/components/<<restrictive-component>>]">

</par>

</jcr:root>

Avatar

Employee

Have you tried setting up policies [1] for your parsys? Create one policy per parsys and in policy, you can configure a list of components that should be allowed for that parsys.

 

[1] https://experienceleague.adobe.com/docs/experience-manager-65/developing/platform/templates/page-tem...?