Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
<!-- Code snippet to inject all child pages into current page -->
<%
Iterator<Page> childPages = resourcePage.listChildren();
while (childPages.hasNext()) {
Page childPage = childPages.next();
String childPageUrl = childPage.getPath() + ".html";
%>
<sling:include path="<%= childPageUrl %>" />
<% } %>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment