I repeat all the child pages to display their names and links. But I also need to display the first paragraph of the node, if it exists.
For example, wow would I get the first PAR node from the next content page?
/content /foo /jcr:content /title /par <- need this one /par /image
I thought that no classlow getProperties().get() would work, but I only see examples returning the attributes inside jcr: content, and not the child nodes below it.
ArrayList aChildren = new ArrayList(); String listroot = properties.get("listRoot", currentPage.getPath()); Page rootPage = pageManager.getPage(listroot); if (rootPage != null) { Iterator<Page> children = rootPage.listChildren(new PageFilter(request)); while (children.hasNext()) { Page child = children.next(); out.println( child.getTitle() + "<br>" );
Can this be done with either another tag specific to CQ, or is this a job for java functions?
source share