Changes for page Document Tree
Last modified by Ludovic Dubost on 2024/07/22 15:50
From version 3.1
edited by Ludovic Dubost
on 2015/11/28 14:58
on 2015/11/28 14:58
Change comment:
Install extension [org.xwiki.platform:xwiki-platform-index-tree-macro-7.3]
To version 2.1
edited by Ludovic Dubost
on 2015/09/01 11:46
on 2015/09/01 11:46
Change comment:
Install extension [org.xwiki.platform:xwiki-platform-index-ui-7.1]
Summary
-
Page properties (1 modified, 0 added, 0 removed)
-
Objects (2 modified, 0 added, 1 removed)
Details
- Page properties
-
- Content
-
... ... @@ -17,6 +17,10 @@ 17 17 18 18 {{documentTree compact="true" /}} 19 19 20 + == Document Index Tree == 21 + 22 + {{documentTree showSpaces="true" /}} 23 + 20 20 == Wiki > Space > Page Tree == 21 21 22 22 {{documentTree showWikis="true" showSpaces="true" showTranslations="false" showAttachments="false" showChildDocuments="false" /}}
- XWiki.WikiMacroClass[0]
-
- Macro code
-
... ... @@ -1,11 +3,19 @@ 1 -{{include reference="XWiki.DocumentTreeConfig" /}} 2 - 3 3 {{velocity}} 4 4 #macro (escapeMacroParam $value)$!value.replaceAll('([~"])', '~$1')#end 5 -## showChildDocuments is deprecated since 7.2M2. Fall-back on hierarchyMode for backwards compatibility. 6 -#if ($xcontext.macro.params.showChildDocuments == 'true') 7 - #set ($discard = $xcontext.macro.params.set('hierarchyMode', 'parentchild')) 8 -#end 3 +#set ($docTreeConfig = { 4 + 'showWikis': false, 5 + 'showWikiPrettyName': true, 6 + 'showSpaces': false, 7 + 'showDocumentTitle': true, 8 + 'showTranslations': true, 9 + 'showAttachments': true, 10 + 'showObjects': false, 11 + 'showClassProperties': false, 12 + 'showChildDocuments': true, 13 + 'showOnlyViewable': true, 14 + 'filterByClass': '', 15 + 'root': '' 16 +}) 9 9 #set ($resourceParams = {'outputSyntax': 'plain'}) 10 10 #foreach ($entry in $docTreeConfig.entrySet()) 11 11 #set ($value = $xcontext.macro.params.get($entry.key)) ... ... @@ -31,7 +31,8 @@ 31 31 #set ($discard = $xwiki.ssx.use('IconThemes.FontAwesome')) 32 32 ## Include also the fix for the FontAwesome loading issue on IE8. 33 33 #set ($discard = $xwiki.jsx.use('IconThemes.FontAwesome')) 34 -{{tree reference="#escapeMacroParam($reference)" dragAndDrop="$editable" contextMenu="$editable" 35 - icons="$isFullWidthAvailable" edges="$isFullWidthAvailable" links="$links" checkboxes="$checkboxes" 36 - openTo="#escapeMacroParam($xcontext.macro.params.openTo)" finder="$finder" /}} 42 +{{tree reference="#escapeMacroParam($reference)" root="#escapeMacroParam($xcontext.macro.params.root)" 43 + dragAndDrop="$editable" contextMenu="$editable" icons="$isFullWidthAvailable" edges="$isFullWidthAvailable" 44 + links="$links" checkboxes="$checkboxes" openTo="#escapeMacroParam($xcontext.macro.params.openTo)" 45 + finder="$finder" /}} 37 37 {{/velocity}}
- XWiki.WikiMacroParameterClass[9]
-
- Parameter default value
-
... ... @@ -1,1 +1,1 @@ 1 -re ference1 +true - Parameter description
-
... ... @@ -1,1 +1,1 @@ 1 - Specifies which hierarchytouse betweendocuments. Possiblevalues are "reference" (default) and "parentchild".If "reference" is usedthen the documenthierarchy isdefined using only the document reference, especially the nestedspaces componentofthe documentreference. If "parentchild"is used then the hierarchy is based on the parent/child relationship defined by the "parent" document fieldfrom the database.1 +Whether to show the child documents based on the document parent field. - Parameter name
-
... ... @@ -1,1 +1,1 @@ 1 -h ierarchyMode1 +showChildDocuments
- XWiki.WikiMacroParameterClass[18]
-
- Parameter default value
-
... ... @@ -1,1 +1,0 @@ 1 -false - Parameter description
-
... ... @@ -1,1 +1,0 @@ 1 -Whether to show the root node or not. The root node is not shown by default because it is usually implied from the context where the tree is displayed (e.g. a label before the tree). There are some cases though when you may want to display the root node: to be able to create a new node under the root. - Parameter mandatory
-
... ... @@ -1,1 +1,0 @@ 1 -No - Parameter name
-
... ... @@ -1,1 +1,0 @@ 1 -showRoot