Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.

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




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


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


Please use this thread to ask the related questions.

Kautuk Sahni

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

1 Reply