Skip to content

Instantly share code, notes, and snippets.

@UberNick
Created September 10, 2013 01:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save UberNick/6503920 to your computer and use it in GitHub Desktop.
Save UberNick/6503920 to your computer and use it in GitHub Desktop.
<!-- 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