Expand my Community achievements bar.

Restrict Allowed Component Group in Template Policy | AEM Community Blog Seeding

Avatar

Administrator

BlogImage.jpg

Restrict Allowed Component Group in Template Policy by AEM Lab - Arun Patidar

Abstract

In Dynamic/Editable Template, The Component level policy allows to configure various properties. One of the properties for responsivegrid or container or any other container component is to allowe child components inside parsys/responsivegrid, which template author can define.

To Allow Components , Template author has to create policy and select components from the Allowed Components list.

But Template Author can see all the components group to select and sometimes you just want to enable few components to be allowed, for example, a card container can only have card components. But you cannot restrict template Author to choose from.



How to Restrict Groups in the Allowed Components list
Unfortunately, there is no OOTB configuration/solution to achieve this. If you want to restrict allowed components then you have to write a custom solution. I am going to explain one of the custom solutions here. 
The Allowed Component list is generated from /libs/cq/gui/components/authoring/allowedcomponents , so I will create custom allowedcomponents (/apps/commons/components/authoring/allowedcomponents) based on /libs/cq/gui/components/authoring/allowedcomponents

I am going to create a custom allowed component which will be used wherever I have to restrict allowed components.

Read Full Blog

Restrict Allowed Component Group in Template Policy

Q&A

Please use this thread to ask the related questions.



Kautuk Sahni
Topics

Topics help categorize Community content and increase your ability to discover relevant content.

1 Reply