page_whiteLists all children documents of the currently browsed document
Developed by

xwiki:XWiki.FriedemannLoew

Rating
Rate!
0 Votes
LicenseGNU Lesser General Public License 2.1

Description

A new Document Tree Macro, and a generic Tree Macro have been introduced in XWiki 6.3.

If the current document is WebHome, the pages of the whole space are printed.

You'll need to install the new version of the DocumentTree Plugin before being able to use this code snippet.

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
#end

Result

  • ChildPage1
    • ChildPage2
    • ChildPage3
      • ChildPage4
    • ChildPage5
      • ChildPage6
      • ChildPage7
  • ChildPage8

Prerequisites & Installation Instructions

Copy the code snippet to a page and save it.

Tags:
Created by FriedemannLoew on 2007/02/27 17:25
     

Get Connected