Hi,
I want to use the accordion component from core components but I don't want to nest it. The approach is that to create a policy that will not allow adding accordion to the accordion panels. I would like to add a possibility to add a container to the accordion panel but restrict this container to don't add an accordion component.
Is it possible to handle that case with a suitable policy for this nested component or there is the different method?
Solved! Go to Solution.
Views
Replies
Total Likes
Hi @mtobiasz
You can configure the allowed components such as containers, text and so on.. through policy configuration for any core component.
On the page template component layout section you can select the accordion component and configure the policy.
The Allowed Components tab is used to define which components can be added as items to panels in the Accordion Component by the content author.
These configurations will be stored under /conf/project specific folder policy node.
After all configuration when you try to add component in accordion it will look something like below
More informaiton is avaialble here:
Hope this helps!
Thanks!
Hello,
If i understood your requirement. you can do it by extending it so that you can modify/apply the policy you want as default its associated to ".wcm-core" group.
now, once you categorized it to one of your component group (or even temporary you can modify the core only) then through template policy you can enable it and then in the same plz you can configure the allowed component (in design dialog) to only allow container component you want rather default. also, going forward you can setup policy for the container as well.
I hope it helps!!
Hi,
I would like that this policy would only apply to the container inside the accordion (in the scope of the accordion policy) but not to the container outside the accordion. Is possible?
Views
Replies
Total Likes
Hi @mtobiasz
You can configure the allowed components such as containers, text and so on.. through policy configuration for any core component.
On the page template component layout section you can select the accordion component and configure the policy.
The Allowed Components tab is used to define which components can be added as items to panels in the Accordion Component by the content author.
These configurations will be stored under /conf/project specific folder policy node.
After all configuration when you try to add component in accordion it will look something like below
More informaiton is avaialble here:
Hope this helps!
Thanks!
Thanks for your response.
I'm aware of creating a policy for accordion so I can select only allowed components. But my question is related to using the policy for component one level down.
- accordion_policy
-- allowed components
--- container
---- allowed components
----- same components like in accordion allowed components list
Like in your example I would like to add the Container component as an item to the accordion but I would like to restrict this Container to allow only adding the same components as for the accordion component (In your example Button and Container). This restriction should work only in the scope of the accordion policy.
Views
Replies
Total Likes
Hi @mtobiasz
As per your requirement "I would like to restrict this Container to allow only adding the same components as for the accordion component (In your example Button and Container)" this is already working as you mentioned.
After adding another container into the accordion, it does not allow to add any other component except the allowed components into the container.
Thanks!
Views
Replies
Total Likes
Thanks for the update.
This was not working for my container like you described and now I know why
My custom container has a policy applied with allowed components which is wider than the policy created for accordion. It seems that when the component has its own policy then the accordion policy is not used.
I have created another container component dedicated to the accordion that doesn't have a policy with allowed components and now when inserting into an accordion it shows the same components as the accordion.
Views
Replies
Total Likes
Sounds good!
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies
Views
Like
Replies