Sightly: Include multiple components of the same type in a loop.
I need to create multiple instances of the same component in a loop based on how many items are in a list. This was easily accomplished in jsp's but in sightly I am not finding a way to do this. In a jsp I would do a cq:include and if the path had the same name it would append a count on the end. Below is an example of my sightly component but need some advice on how to do this correctly. An example of what would be in the row.columnList would be {6,3,3}
<div data-sly-use.row="com.my.aem.components.view.models.MyRowComponent" data-sly-unwrap> <p data-sly-test="${!row.columns}">Please configure row</p> <div class="row"> <div data-sly-list="${row.columnList}" class="pod-grid container-fluid"> <div class="col-md-${item}"> <div data-sly-resource="${'testcomponent' @ resourceType='my/components/content/pods/testcomponent' }"></div> </div> </div> </div> </div>Any help would be appreciated
