Child Page Snippet
Prints a tree of child pages of the current document. If the current document is WebHome, the pages of the whole space are printed.Code
#if($doc.name=="WebHome")
#set($tree = $xwiki.doctree.getSpaceDocumentTree($doc.web))
#else
#set($tree = $xwiki.doctree.getDocumentTree($doc))
#end
#set($depths=["", "*", "**", "***", "****", "*****", "******", "*******", "********"])
#foreach($leaf in $tree)
#if($leaf.depth <= 8 && ($leaf.depth != 0 || $doc.name=="WebHome"))
$depths.get($leaf.depth) [$xwiki.getDocument($leaf.fullName).getDisplayTitle()>$leaf.fullName]
#end
#endResult
- ChildPage1
- ChildPage2
- ChildPage3
- ChildPage4
- ChildPage5
- ChildPage6
- ChildPage7
- ChildPage8
Version 5.1 last modified by VincentMassol on 09/12/2007 at 13:43
Comments: 4