Hi,
I have a layout container within a template for an experience fragment and added components into it. Now i have a component-A that can have nested components within it.
This is based on editable templates
Layout container -> contains componentA and component A can have a set of new components that can only be added if component A is dragged. These new components will not be visible in the layout container.
@arunpatidar
Is there a way to achieve this for an XF based on editable template where components will not be visible for the layout container but only be visible when one wants to add components within component A?
Solved! Go to Solution.
Views
Replies
Total Likes
Please find steps for anyone in need and thank you @aanchal-sikka
1. Within CRX/DE , created a policy
/conf/XYZ/settings/wcm/policies/XXX/components/content/component/component_policy
with res type - wcm/core/components/policy/policy
components string[] - list of components
2. Create a mapping
/conf/XYZ/settings/wcm/templates/custom_template/policies/jcr:content/root/XXX/components/content/component
res:type - mapping- wcm/core/components/policies/mapping
policy - map it to the policy created above - XXX/components/content/component/component_policy
Views
Replies
Total Likes
The components allowed in a container are based on policies.
Assuming componentA is also a container component, one can have separate policies for Layout container and Component A.
By default, the Component List on Left panel will show all components, that should be ok.
You would only be able to drop components in componentA/Layout-container, based on their policies.
Hi @aanchal-sikka , component A is dragged within the layout container. Is there a way to add policies to component A to be able to drag drop only certain components ? Please let me know
Views
Replies
Total Likes
Add policy to the component via its Editable template.
- Go to the Editable template
- Click on policy button next to the ComponentA
- Create a policy with the necessary allowed components
I don't happen to see a policy button near the custom component similar to few you have in there
Views
Replies
Total Likes
Will post steps. I believe i may have the answer to this.
Views
Replies
Total Likes
Please find steps for anyone in need and thank you @aanchal-sikka
1. Within CRX/DE , created a policy
/conf/XYZ/settings/wcm/policies/XXX/components/content/component/component_policy
with res type - wcm/core/components/policy/policy
components string[] - list of components
2. Create a mapping
/conf/XYZ/settings/wcm/templates/custom_template/policies/jcr:content/root/XXX/components/content/component
res:type - mapping- wcm/core/components/policies/mapping
policy - map it to the policy created above - XXX/components/content/component/component_policy
Views
Replies
Total Likes