Changes for page Document Tree
Last modified by Ludovic Dubost on 2024/07/22 15:50
From 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]
To 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]
Summary
-
Page properties (1 modified, 0 added, 0 removed)
-
Objects (2 modified, 1 added, 0 removed)
Details
- Page properties
-
- Content
-
... ... @@ -17,10 +17,6 @@ 17 17 18 18 {{documentTree compact="true" /}} 19 19 20 - == Document Index Tree == 21 - 22 - {{documentTree showSpaces="true" /}} 23 - 24 24 == Wiki > Space > Page Tree == 25 25 26 26 {{documentTree showWikis="true" showSpaces="true" showTranslations="false" showAttachments="false" showChildDocuments="false" /}}
- XWiki.WikiMacroClass[0]
-
- Macro code
-
... ... @@ -1,19 +1,11 @@ 1 +{{include reference="XWiki.DocumentTreeConfig" /}} 2 + 1 1 {{velocity}} 2 2 #macro (escapeMacroParam $value)$!value.replaceAll('([~"])', '~$1')#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 -}) 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 17 17 #set ($resourceParams = {'outputSyntax': 'plain'}) 18 18 #foreach ($entry in $docTreeConfig.entrySet()) 19 19 #set ($value = $xcontext.macro.params.get($entry.key)) ... ... @@ -39,8 +39,7 @@ 39 39 #set ($discard = $xwiki.ssx.use('IconThemes.FontAwesome')) 40 40 ## Include also the fix for the FontAwesome loading issue on IE8. 41 41 #set ($discard = $xwiki.jsx.use('IconThemes.FontAwesome')) 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" /}} 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" /}} 46 46 {{/velocity}}
- XWiki.WikiMacroParameterClass[9]
-
- Parameter default value
-
... ... @@ -1,1 +1,1 @@ 1 - true1 +reference - Parameter description
-
... ... @@ -1,1 +1,1 @@ 1 - Whether to show the child documentsbased on the document parent field.1 +Specifies which hierarchy to use between documents. Possible values are "reference" (default) and "parentchild". If "reference" is used then the document hierarchy is defined using only the document reference, especially the nested spaces component of the document reference. If "parentchild" is used then the hierarchy is based on the parent/child relationship defined by the "parent" document field from the database. - Parameter name
-
... ... @@ -1,1 +1,1 @@ 1 - showChildDocuments1 +hierarchyMode
- XWiki.WikiMacroParameterClass[18]
-
- Parameter default value
-
... ... @@ -1,0 +1,1 @@ 1 +false - Parameter description
-
... ... @@ -1,0 +1,1 @@ 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,0 +1,1 @@ 1 +No - Parameter name
-
... ... @@ -1,0 +1,1 @@ 1 +showRoot