Using data-sly-list
I can iterate over a list object in Sightly, but how can I check if a list is empty? data-sly-list
simply renders nothing on empty list objects and I need to display an alternativ text if the list contains no items.
Thanks
Use data-sly-test
and !
operator:
<div data-sly-test="${!myList}">List is empty</div>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With