Hi Everyone,
I have a below use case where I am facing an issue with policies applied to custom container component which has been inherited from AEM core container component.
Problem statement:
We have our AEM editable template pages where container component is used as a parent component to author the custom components on the page. I have a new requirement to create a custom component with title,rte,image and one container component included using data-sly-resource in it. The problem here is when I have created a custom policy for the new custom component 's container included in it. It is inheriting the common container component policies but not the one I have created for it. when I click on the embedded container component from sidekick and click on "+" insert component from component's EditableToolbar, it is picking the correct policy where I am restricting components from but when I click on the parsys where we see "Drag components here" message inside the nested container component, it is inheriting the common container policy but not from the one defined for component's parent. Any insights on this issue.
Thanks in advance!
Solved! Go to Solution.
Topics help categorize Community content and increase your ability to discover relevant content.
Views
Replies
Total Likes
Hi @Anudeep_Kumar,
AEM does not auto-assign policies to embedded containers unless they have a unique cq:policy binding at the template level.
Could you give a try to below steps?
1. Create a Structure Node in Template
Go to your editable template (used by the page)
Open the Structure layer
Select your custom component, then click the nested container inside it (it may show as "Layout Container" or similar)
Now set a policy for that inner container (via the Policy dialog in Template Editor)
This will create a template structure node like:
/conf/your-site/settings/wcm/templates/your-template/structure/jcr:content/root/yourCustomComponent/innerContainer
...with a cq:policy property bound to your intended policy.
OR
2. Use cq:template Include and Define Policies in Template Directly
Instead of defining the nested container in the component, let the author drag the container in manually in the template — this gives full control and policy binding via the UI.
This shifts the policy responsibility to the template, which is how AEM was designed to manage granular policies.
Hi @Anudeep_Kumar,
AEM does not auto-assign policies to embedded containers unless they have a unique cq:policy binding at the template level.
Could you give a try to below steps?
1. Create a Structure Node in Template
Go to your editable template (used by the page)
Open the Structure layer
Select your custom component, then click the nested container inside it (it may show as "Layout Container" or similar)
Now set a policy for that inner container (via the Policy dialog in Template Editor)
This will create a template structure node like:
/conf/your-site/settings/wcm/templates/your-template/structure/jcr:content/root/yourCustomComponent/innerContainer
...with a cq:policy property bound to your intended policy.
OR
2. Use cq:template Include and Define Policies in Template Directly
Instead of defining the nested container in the component, let the author drag the container in manually in the template — this gives full control and policy binding via the UI.
This shifts the policy responsibility to the template, which is how AEM was designed to manage granular policies.
Views
Likes
Replies
Views
Likes
Replies
Views
Likes
Replies