Hi Team
We are currently working on developing a column control component with two columns and two containers. We need to restrict certain components to the first column cotainer and a different set of components to the second container. However, We can set policies only on container component and it gets applied to every container. Is there a way we can achieve this?
Thanks
Veena
Solved! Go to Solution.
Topics help categorize Community content and increase your ability to discover relevant content.
Views
Replies
Total Likes
You can assign different policies to the column components only if each column is a separate component. You could create proxy components for each column to apply different policies.
Then, you can directly set the desired policies to those individual column components.
If you need to set different policy for a component differently if used another component then you can use something like below.
For example, if I want different policy for a parsys within tabs component then I can use something like below:
<tabs
cq:policy="myproj/components/content/tabs/policy_tabs_1"
jcr:primaryType="nt:unstructured"
sling:resourceType="wcm/core/components/policies/mapping">
<wcm jcr:primaryType="nt:unstructured">
<foundation jcr:primaryType="nt:unstructured">
<components jcr:primaryType="nt:unstructured">
<parsys
cq:policy="myproj/components/content/tabs/policy_tabs-parsys"
jcr:primaryType="nt:unstructured"
sling:resourceType="wcm/core/components/policies/mapping" />
</components>
</foundation>
</wcm>
</tabs>
.
Can you try creating a new container proxy component and setting policies for it? I think it is worth trying this workaround if we don't find any viable solution.
You can assign different policies to the column components only if each column is a separate component. You could create proxy components for each column to apply different policies.
Then, you can directly set the desired policies to those individual column components.
If you need to set different policy for a component differently if used another component then you can use something like below.
For example, if I want different policy for a parsys within tabs component then I can use something like below:
<tabs
cq:policy="myproj/components/content/tabs/policy_tabs_1"
jcr:primaryType="nt:unstructured"
sling:resourceType="wcm/core/components/policies/mapping">
<wcm jcr:primaryType="nt:unstructured">
<foundation jcr:primaryType="nt:unstructured">
<components jcr:primaryType="nt:unstructured">
<parsys
cq:policy="myproj/components/content/tabs/policy_tabs-parsys"
jcr:primaryType="nt:unstructured"
sling:resourceType="wcm/core/components/policies/mapping" />
</components>
</foundation>
</wcm>
</tabs>
.
Views
Likes
Replies
Views
Likes
Replies