Highlighted

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

Avatar

Avatar

kautuk_sahni

Community Manager

Total Posts

5.6K

Likes

965

Correct Answer

1.1K

Avatar

kautuk_sahni

Community Manager

Total Posts

5.6K

Likes

965

Correct Answer

1.1K
kautuk_sahni
Community Manager

10-08-2020

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.

AEM AEMEBlogSeeding Experience Manager

Replies

Highlighted

Avatar

Avatar

kautuk_sahni

Community Manager

Total Posts

5.6K

Likes

965

Correct Answer

1.1K

Avatar

kautuk_sahni

Community Manager

Total Posts

5.6K

Likes

965

Correct Answer

1.1K
kautuk_sahni
Community Manager

11-08-2020

test