0
votes

You helped me multiple times with good ideas, instructions and sample code, maybe this time you can help me again. In our AEM 6.0 SP3 project we need to implement a parsys where only one instace of a component can be placed. On another page we need a parsys where we can place a maximum of 3 instaces. In the old JSP Parsys Components it was much easier to limit the amount of components. But now we are inheriting from the sightly parsys component "/libs/wcm/foundation/components/parsys".

The solution should be to not render the "new parsys" when component limit is reached.

Looking forward to hear from you guys ;)

Cheers Tim

3

3 Answers

0
votes

Well in your Use class, you can look for the parsys node (parent node), go through the list of childs and see how many time you find a node with the same sling:resouceType and take your decision from there...does this help you a bit?

This is a very rough solution, other people may bring smarter ones :)

0
votes

But i cannot remove the "parsys drop component here" field in a clean way. There have to be another solution.

0
votes

I found 2 links were exactly this problem is solved. I try to adapt this is my project and let you guys now if this works fine. But iam working with AEM 6.0 and this is made for 6.1

classic-ui

touch-ui