children

Last modified by Lucas Charpentier on 2026/10/27 10:27

Audit

Macro ID
children
Source
XS
Type
Generator
Classification reason

Status
Reviewed
Criteria version
15.20
XWiki version
18.8.0
Audit date
2026-10-14
Auditor
Compared macros
documentTree toc

Sources

Where to gather the information the criteria are checked against, see Gather the sources.

SourceWhat it givesUsed forWhere
DocumentationParameters, default values and examples, including the most common exampleL2, L3, and the criteria measured with the most common examplehttps://extensions.xwiki.org/xwiki/bin/view/Extension/Children%20Macro/
Source codeHow the macro declares its parameters and content: types, groups, features, advanced and hidden flags, constraints, content type, inline supportC4, C5, C7, C8, C9, C13, E4, E6https://github.com/xwiki/xwiki-platform/blob/xwiki-platform-18.8.0/xwiki-platform-core/xwiki-platform-index/xwiki-platform-index-tree/xwiki-platform-index-tree-macro/src/main/resources/XWiki/ChildrenMacro.xml
Macro descriptorWhat the Edit Macro dialog is built from, on design.xwiki.orgD1, D2, C1 to C9, E4Descriptor, list of macros with their categories
TranslationsThe name, description and parameter names in each languageD1, D2, D4, C1l10n.xwiki.org
Uses in XWiki pagesHow XWiki itself uses the macro, a realistic example when the documentation has noneL3, C2, C3, C6, C8, C9Search the xwiki organization on GitHub
Compared macrosThe audits of the macros of the same typeL1, D3documentTree, toc
Other sources specific to this macro
CriterionResultNotes
D1 wordingOK
D2 summaryKOthe description speaks of child pages only, while the tree also lists the Translations and Attachments of the root page: {{children root="document:Sandbox.WebHome"/}} shows "Translations" and "Attachments" nodes before the child pages. It also says "children pages" instead of "child pages".
D3 categoryOK
D4 quick-actionKOQuick Actions finds the macro first for "children", "Children" and the French name "Enfants". The synonyms "subpages", "child pages" and "sitemap" give no result, and "page tree" only finds the documentTree macro, "Page Tree".
L1 consistencyOKcompared with documentTree and toc: like them, no parameter is mandatory, there is no content, and the Quick Action inserts the macro right away, with no dialog. Unlike them, children declares no default value for its parameters: the documentation gives title:asc and the current page, which the descriptor does not.
L2 doc-parametersKOthe parameters are only documented on the legacy extensions.xwiki.org page, not in the new documentation. That page also lists "name" as a sort field: {{children sort="name"/}} works, but the Sort by select does not offer it.
L3 doc-exampleOK
I1 patternOKchildren is the reference generator, so it is compared with documentTree and toc: all three are inserted by their Quick Action without a dialog, and through the Insert Macro dialog with an Edit Macro dialog whose fields are all optional.
I2 zero-configOKQuick Actions and the Edit Macro dialog submitted with the default values insert {{children/}} . On a page without child pages, view mode shows "No pages found" as an information node, not as an error, which is a sensible result. The editor shows only the "macro:children" placeholder, see E1.
I3 instantN/A
I4 cursorN/A
I5 focusOKthe macro has no mandatory parameter, and its two fields are visible without scrolling, with the focus on the first one, the type selector of Root.
E1 wysiwygKOthe editor never shows the tree, only the generic "macro:children" placeholder, even when the page has child pages: the tree is built by JavaScript that does not run in the editor. To reproduce: on a page with two child pages, insert {{children/}} : view mode lists both pages as a tree, the WYSIWYG editor only shows "macro:children".
E2 errorsKOinvalid values are accepted silently, and some give a misleading "No pages found" on a page that has child pages. For example {{children sort="foo"/}} , {{children root="Sandbox.WebHome"/}} , a plain page reference without the "document:" prefix, while Sandbox has child pages, and {{children root="NoSuch.Page"/}} all render "No pages found" with no message, and {{children sort="title:sideways"/}} is ignored.
E3 nestingKOin a list item and in a table cell, like * {{children/}} , the macro is inline and renders "The [children] macro is a standalone macro and it cannot be used inline." in the editor and in view mode. Inserting it from Quick Actions at the end of a list item gives the same error and saves * two{{children/}}((( ))) . In a box it works. The macro has no content, so the second half of the measure does not apply.
E4 inline-supportOKthe macro declares no inline support, and its output is a tree, a block that cannot be inside a sentence.
E5 emptyN/A
E6 inplaceN/A

Parameters

ParameterC1 clarityC2 mandatoryC3 defaultsC4 input-assistanceC5 groupsC6 orderC7 alternativesC8 advancedC9 technicalC13 constraintsNotes
sortOKOKKOOKOKOKN/AOKOKOK

C3, minor: the two selects open on "-", which means the default sort, title ascending, the value of the most common example. Neither the field nor the description says what "-" sorts by.

C4: two selects, one for the page field, Title, Last modification date or Creation date, and one for the order.

C13: the selects only offer valid values, so the dialog cannot submit an invalid one.

rootKOOKOKKOOKOKN/AOKOKOK

C1: the description is technical and wrong for this macro: "The root node id. [...] The entire tree is displayed if the root node is not specified." It speaks of nodes, a documentTree notion, while an empty Root shows the child pages of the current page, not the entire tree. To reproduce: open the Edit Macro dialog of {{children/}} .

C3: no default is declared, but the field opens empty, which means the current page, the value of the most common example.

C4, minor: the page picker works, but its type selector offers nine types, Farm, Wiki, Space, Document, All attachments, Attachment, All translations, All objects and Objects of type, while the macro is about child pages. Most of them do not give child pages: {{children root="space:xwiki:Sandbox"/}} renders "No pages found", {{children root="attachments:Sandbox.WebHome"/}} lists attachments, and {{children root="farm:*"/}} shows only the wiki.

C13: no format can be declared, the macro being a wiki macro, but the picker builds a valid "document:" reference, so the dialog does not need to reject a typed value.

Other notes

The problem of the earlier analysis, a double click anywhere in the page opening the children dialog, does not happen on 18.8.0: the macro frame only covers the macro.

KOs and tickets

Every KO needs a ticket covering it, see Report the KOs. One ticket can cover several KOs. Known issues filed for this macro are suggested in italics: link them as existing tickets when they cover the KO.

KOCriterionExisting ticketsNew tickets
D2D2 summaryXWIKI-25470
D4D4 quick-actionXWIKI-25444
L2L2 doc-parametersXINFRA-525
E1E1 wysiwygXWIKI-25523 (partial), XWIKI-25524
E2E2 errorsXWIKI-23142XCOMMONS-3847 (partial), XRENDERING-823 (partial)
E3E3 nestingXWIKI-23501
C3:sortC3 defaults, sortXWIKI-25472
C1:rootC1 clarity, rootXWIKI-25470
C4:rootC4 input-assistance, rootXWIKI-25565
Success

Every KO is covered by a ticket.

Tickets

TicketOriginKOs coveredKOs partly covered
XWIKI-23142ExistingE2
XCOMMONS-3847NewE2
XRENDERING-823NewE2
XWIKI-25444NewD4
XWIKI-25470NewC1:root D2
XWIKI-25472NewC3:sort
XINFRA-525NewL2
XWIKI-25523NewE1
XWIKI-25524NewE1
XWIKI-23501ExistingE3
XWIKI-25565NewC4:root

Known issues of this macro

IssueTitleStatusCriteria
XWIKI-23142Rendering error is not clear when inserting a wrong Root parameter in Children Macro and Page Tree MacroOpenE2

68 more known issues affect every macro: see the Known issues.

Get Connected