How to check the size of list in sightly?

Avatar

Avatar

Dinu_Arya

Avatar

Dinu_Arya

Dinu_Arya

15-10-2015

Hi,

I need to check size of the list in sightly. I need to display UI only when it has more than 2 items in list. Any idea?

Thanks,

Arya.

desktop_exl_promo_600x100_weknowyou.png

Accepted Solutions (1)

Accepted Solutions (1)

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

15-10-2015

Use Slighty and Java and count the list. If you are not aware of how to use Sligtly with Java - see: https://helpx.adobe.com/experience-manager/using/creating-sightly-component.html

Answers (1)

Answers (1)

Avatar

Avatar

ethang66605959

Avatar

ethang66605959

ethang66605959

15-10-2015

Java counting is a good way to solve your problem 🙂