Is there a way to test if listChildren will return anything? Something along the line of: <sly data-sly-test=${item.listChildren.size > 0} />
0
votes
1 Answers
2
votes
Assuming this is a followup of Sightly Implicit Objects, the listChildren method will return an Iterator. You can check it’s not empty by calling its hasNext method:
<sly data-sly-test=“${item.listChildren.hasNext}”>