Changes for page Children Macro

Last modified by Martin Výlet on 27.05.2025 15:40

From version 4.1
edited by superadmin
on 06.01.2023 12:57
Change comment: Install extension [org.xwiki.platform:xwiki-platform-index-tree-macro/14.10.2]
To version 6.1
edited by Martin Výlet
on 19.03.2025 21:26
Change comment: Install extension [org.xwiki.platform:xwiki-platform-index-tree-macro/17.1.0]

Summary

Details

Page properties
Author
... ... @@ -1,1 +1,1 @@
1 -XWiki.superadmin
1 +XWiki.vyl0022
XWiki.WikiMacroClass[0]
Macro code
... ... @@ -1,3 +1,5 @@
1 1  {{velocity}}
2 -{{documentTree root="document:" /}}
2 +## Escape special characters in the macro parameter value.
3 +#set ($sort = $xcontext.macro.params.sort.replaceAll('([~"])', '~$1'))
4 +{{documentTree root="document:" sortDocumentsBy="$!sort" /}}
3 3  {{/velocity}}
XWiki.WikiMacroParameterClass[0]
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 mandatory
... ... @@ -1,0 +1,1 @@
1 +No
Parameter name
... ... @@ -1,0 +1,1 @@
1 +sort
Parameter type
... ... @@ -1,0 +1,1 @@
1 +org.xwiki.index.tree.internal.macro.DocumentSort