"children" Macro

Last modified by Lucas Charpentier on 2026/11/12 15:15

Reference

Description

The children macro displays the child pages of the current page as a tree. Each page is a link, and a page that has children of its own can be expanded.

It is a shortcut for the "documentTree" macro, which offers more control over what the tree shows.

Usage

{{children/}}

In the WYSIWYG editor the macro is listed as "Children", in the Navigation category.

The macro is standalone only and takes no content. Two behaviours are worth knowing before you use it:

  • when the page has attachments or translations, the tree lists them as well, in an "Attachments" and a "Translations" node placed before the child pages;
  • a page without children displays the message "No pages found".

Parameters

NameMandatoryAllowed ValuesDefault ValueDescription
rootnodocument: followed by a page reference, such as document:xwiki:Sandbox.WebHomedocument:, the current pageThe page whose children are displayed. The page itself is not part of the tree. A reference written without the document: prefix matches nothing, and the tree displays "No pages found".
sortnotitle, name, date for the last modification date or creationDate, optionally followed by :asc or :desctitle:ascThe page field used to sort the child pages, and the sort order. The order is ascending when it is left out. The "Sort by" field of the Edit Macro dialog does not offer name: sorting on the page name is only available in wiki syntax.

Examples

List the Children of the Current Page

{{children/}}

A tree of three pages, Guides, Meetings and Release Notes, sorted by title

Show the Most Recently Modified Children First

{{children sort="date:desc"/}}

List the Children of Another Page

{{children root="document:xwiki:Sandbox.WebHome"/}}

Related

Get Connected