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
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

Restrict number of component in parsys

vijayk87714775
Level 4
Level 4

Hi, I've a project requirement (AEM 6.2) where I need to restrict the specific component in parsys to a limited count? Let's say I've 3 component allowed for a particular section parsys. Let's call it {A, B, C}. The 'A' component can be dragged any number of time in parsys but if component 'B' is dragged on parsys then it shouldn't allow to drag component 'C' and vice-versa. Thanks, Vijay

1 Accepted Solution
kautuk_sahni
Correct answer by
Community Manager
Community Manager

Here is the working example:- Experiencing Adobe Experience Manager - Day CQ: AEM 61 - Touch UI Limit the Number of Components Add...

But, Editable template has evolved big way now. I would recommend you to use Editable Template for this.

View solution in original post

5 Replies
smacdonald2008
Level 10
Level 10

This is where when using a more recent version of AEM Editable Templates and policies are best practice. When setting policies in an editable template - you can control which components are allowed to be used.

vijayk87714775
Level 4
Level 4

Hi Rajashankar ,

Thanks for the reply . In the link you have provided , one with reply that is marked as correct seems like those urls are not valid any more.

thanks,

Vijay.

bsloki
Community Advisor
Community Advisor

Hi vijayk87714775,

You will have to write a custom JQuery listener to handle this on the drag and drop event.

kautuk_sahni
Correct answer by
Community Manager
Community Manager

Here is the working example:- Experiencing Adobe Experience Manager - Day CQ: AEM 61 - Touch UI Limit the Number of Components Add...

But, Editable template has evolved big way now. I would recommend you to use Editable Template for this.

View solution in original post