This sample works for me (aem6.2 tested): <ul data-sly-list="${currentPage.listChildren}"> <sly data-sly-test="${itemList.first}"> <div> </sly> <li>${item.name}</li> <sly data-sly-test="${itemList.last}"> </div> </sly></ul>
Can you try data-sly-template for the elements to open or close an HTML element?What I think you are facing is that Sighty/HTL is expecting valid HTML.
You need to use the AEM6.2 uber-jar.Doc: https://docs.adobe.com/docs/en/aem/6-2/develop/dev-tools/ht-projects-maven.htmlExample: https://github.com/heervisscher/htl-examples
If you pass through things like resourceResolver / resource from user's request you get the right object/permissions based on the user.When getting the resource-resolver via the factory it is disconnected from the user
Here a working sample for AEM6.2https://github.com/heervisscher/htl-examples/blob/master/core/src/main/java/com/adobe/examples/htl/core/bindings/CustomBindingProvider.java