Changes for page Children Macro
Last modified by Martin Výlet on 27.05.2025 15:40
From version 1.1
edited by XWiki Admin
on 26.05.2017 08:17
on 26.05.2017 08:17
Change comment:
Install extension [org.xwiki.platform:xwiki-platform-index-tree-macro-9.3.1]
To version 9.1
edited by Martin Výlet
on 27.05.2025 15:40
on 27.05.2025 15:40
Change comment:
Install extension [org.xwiki.platform:xwiki-platform-index-tree-macro/17.4.0]
Summary
-
Page properties (1 modified, 0 added, 0 removed)
-
Objects (1 modified, 2 added, 0 removed)
Details
- Page properties
-
- Author
-
... ... @@ -1,1 +1,1 @@ 1 -XWiki. Admin1 +XWiki.vyl0022
- XWiki.WikiMacroClass[0]
-
- Macro code
-
... ... @@ -1,3 +1,10 @@ 1 1 {{velocity}} 2 -{{documentTree root="document:$doc.documentReference" /}} 2 +## Escape special characters in the macro parameter value. 3 +#set ($sort = $xcontext.macro.params.sort.replaceAll('([~"])', '~$1')) 4 +#if ("$!xcontext.macro.params.root" != '') 5 + #set ($root = $xcontext.macro.params.root) 6 +#else 7 + #set ($root = 'document:') 8 +#end 9 +{{documentTree root="$root" sortDocumentsBy="$!sort" /}} 3 3 {{/velocity}} - Default category
-
... ... @@ -1,1 +1,0 @@ 1 -navigation - Cached
-
... ... @@ -1,0 +1,1 @@ 1 +No - Macro description
-
... ... @@ -1,1 +1,1 @@ 1 -Displays a tree of children page of the current page 1 +Displays a tree of children pages of the current page - Asynchronous rendering
-
... ... @@ -1,0 +1,1 @@ 1 +No - Default categories
-
... ... @@ -1,0 +1,1 @@ 1 +Navigation
- XWiki.WikiMacroParameterClass[0]
-
- Parameter name
-
... ... @@ -1,0 +1,1 @@ 1 +sort - Parameter description
-
... ... @@ -1,0 +1,1 @@ 1 +The document field used to sort the child documents, followed optionally by the sort order. E.g.: 'title' or 'date:desc'. - Parameter type
-
... ... @@ -1,0 +1,1 @@ 1 +org.xwiki.index.tree.internal.macro.DocumentSort - Parameter mandatory
-
... ... @@ -1,0 +1,1 @@ 1 +No
- XWiki.WikiMacroParameterClass[1]
-
- Parameter name
-
... ... @@ -1,0 +1,1 @@ 1 +root - Parameter description
-
... ... @@ -1,0 +1,1 @@ 1 +The root node id. This is useful if you want to display only the descendants of a given node (which is the specified root). The tree displays the children of the root node on the first level, so the root node is not actually displayed. The entire tree is displayed if the root node is not specified. The format of a node identifier is entityType:entityReference, where the entity type can be for instance wiki, space, document. E.g.: wiki:xwiki, space:xwiki:Main, document:xwiki:Main.WebHome - Parameter mandatory
-
... ... @@ -1,0 +1,1 @@ 1 +No