Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

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

Avatar

Avatar
Establish
Community Manager
kautuk_sahni
Community Manager

Likes

1,129 likes

Total Posts

6,140 posts

Correct Reply

1,144 solutions
Top badges earned
Establish
Coach
Originator
Contributor 2
Contributor
View profile

Avatar
Establish
Community Manager
kautuk_sahni
Community Manager

Likes

1,129 likes

Total Posts

6,140 posts

Correct Reply

1,144 solutions
Top badges earned
Establish
Coach
Originator
Contributor 2
Contributor
View profile
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

Avatar

Avatar
Establish
Community Manager
kautuk_sahni
Community Manager

Likes

1,129 likes

Total Posts

6,140 posts

Correct Reply

1,144 solutions
Top badges earned
Establish
Coach
Originator
Contributor 2
Contributor
View profile

Avatar
Establish
Community Manager
kautuk_sahni
Community Manager

Likes

1,129 likes

Total Posts

6,140 posts

Correct Reply

1,144 solutions
Top badges earned
Establish
Coach
Originator
Contributor 2
Contributor
View profile
kautuk_sahni
Community Manager

11-08-2020

test