I'm new to AEM, so any advice is appreciated.
Let's say I've something like this:
<div class="big-item" data-sly-list="${features.list}">
<sly data-sly-test="${ itemList.first || itemList.count == 5 || itemList.count == 9 || itemList.count == 13 || itemList.count == 17 }">
<div class="small-item-wrapper>
<div class="additional-div">
</sly>
<div class="small-item">
<div>${item.somecontent}</div>
</div>
<sly data-sly-test="${ itemList.last || itemList.count == "4 || itemList.count == 8 || itemList.count == 12 || itemList.count == 16 }">
</div>
</div>
</sly>
</div>
Basically, what I'm trying to do is to wrap every 4 items in a separate container.
For now, the closing tag isn't rendered or rather is closed only after the last iteration.
Is such an html-templating approach doable in AEM? Can I do this purely in htl? Currently, this does not work for me, I suppose there's some automation going on which I'm not aware of.
How can I do this?
PS. When the structure is simple (no nested divs) seems to be working, when subdivs are added it starts to break.