AEM6.3 - List component with message on maximum of items

Avatar

Avatar

elizabethp60981

Avatar

elizabethp60981

elizabethp60981

03-04-2018

Hi,

I am using the "/apps/core/wcm/components/list/v1" component to have a list of pages.

On fixed list I have the button to add more content and I have as well the "Max items" option.

The max items option is used to show on page the maximum of items that I choose on this option.

I am trying to do a script to show a message or hide the add button when I already have the maximum of items, because the author could add many pages that it won't be displayed on the website.

How can I do this?

Thank you!

Accepted Solutions (0)

Answers (2)

Answers (2)

Avatar

Avatar

navinkaushal

Avatar

navinkaushal

navinkaushal

03-04-2018

@elizabethp6098148

There few things:

1. What is the use case for this? Even If we customize it and restrict Author to create more pages under that path because that will not be displayed on the page which has List (V1) component, Author may want to create more pages despite this limit

2. If the List (V1) component is used on more than 1 page for the same path with different Max number set, which number to be considered

3. If really want to restrict Author to create more than X number of page better we can set some property at Node level rather than considering this MaxNumber property from one/few particular pages.

Let me know your thoughts.

Avatar

Avatar

smacdonald2008

Total Posts

12.7K

Likes

1.4K

Correct Reply

2.3K

Avatar

smacdonald2008

Total Posts

12.7K

Likes

1.4K

Correct Reply

2.3K
smacdonald2008

03-04-2018

Have you tried extending this component and add a variable that  counts the items - when it reaches the max value - then execute your business logic.