Getting the multifield iteration occurrence
Hi Team,
I'm working on a requirement where nested multifields should be there. So I came up with an approach there I haven't used any js to retrieve nested multifields values. But now I want to get the iteration number(occurrence) for parent multifield. I will put the sample code and will show at where I want to take the iteration number. Any help would be appreciated.
<sly data-sly-list-firstmultifield="${resource.getChildren}">
<sly data-sly-test="${firstmultifield.name=='item1'}">
<sly data-sly-list-firstMenuItems="${firstmultifield.getChildren}">
//here need to get the iteration number (like first iteration,second iteration something like itemList.count) of multifield named item 1
<sly data-sly-list-seconmultifield = "${firstMenuItems.getChildren}">
<sly data-sly-test="${seconmultifield .name=='item2'}">
<sly data-sly-list-secondMenuItems="${seconmultifield .getChildren}">
//here need to get the iteration number of multifield named item 2
</sly>
</sly>
</sly>
</sly>
</sly>
</sly>