Children Page Tree
Last modified by Vincent Massol on 2026/06/02 17:54
| Lists all children documents of the currently browsed document |
| Type | Snippet |
| Category | |
| Developed by | xwiki:XWiki.FriedemannLoew |
| Rating | |
| License | GNU Lesser General Public License 2.1 |
Table of contents
Description
If the current document is WebHome, the pages of the whole space are printed.
Code (in XWiki Syntax 1.0)
#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