Changes for page Document Tree
Last modified by Ludovic Dubost on 2024/07/22 15:50
From version 1.1
edited by Ludovic Dubost
on 2014/11/18 12:31
on 2014/11/18 12:31
Change comment:
Install extension [org.xwiki.platform:xwiki-platform-index-ui-6.3]
To version 6.1
edited by Ludovic Dubost
on 2018/07/01 11:40
on 2018/07/01 11:40
Change comment:
Install extension [org.xwiki.platform:xwiki-platform-index-tree-macro/10.5]
Summary
-
Page properties (1 modified, 0 added, 0 removed)
-
Objects (3 modified, 8 added, 0 removed)
- XWiki.WikiMacroClass[0]
- XWiki.WikiMacroParameterClass[9]
- XWiki.WikiMacroParameterClass[10]
- XWiki.WikiMacroParameterClass[14]
- XWiki.WikiMacroParameterClass[15]
- XWiki.WikiMacroParameterClass[16]
- XWiki.WikiMacroParameterClass[17]
- XWiki.WikiMacroParameterClass[18]
- XWiki.WikiMacroParameterClass[19]
- XWiki.WikiMacroParameterClass[20]
- XWiki.WikiMacroParameterClass[21]
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,27 +1,12 @@ 1 +{{template name="documentTree_macros.vm" /}} 2 + 1 1 {{velocity}} 2 -#set ($docTreeConfig = { 3 - 'showWikis': false, 4 - 'showWikiPrettyName': true, 5 - 'showSpaces': false, 6 - 'showDocumentTitle': true, 7 - 'showTranslations': true, 8 - 'showAttachments': true, 9 - 'showObjects': false, 10 - 'showClassProperties': false, 11 - 'showChildDocuments': true 12 -}) 13 -#set ($resourceParams = {'outputSyntax': 'plain'}) 14 -#foreach ($entry in $docTreeConfig.entrySet()) 15 - #set ($value = $xcontext.macro.params.get($entry.key)) 16 - #if ("$!value" != '' && $value != "$!entry.value") 17 - #set ($discard = $resourceParams.put($entry.key, $value)) 18 - #end 4 +#set ($options = {}) 5 +#foreach ($parameterName in $xcontext.macro.params.parameterNames) 6 + #set ($discard = $options.put($parameterName, $xcontext.macro.params.get($parameterName))) 19 19 #end 20 -#set ($editable = $xcontext.macro.params.readOnly != 'true') 21 -#set ($isFullWidthAvailable = $xcontext.macro.params.compact != 'true') 22 -#set ($links = $xcontext.macro.params.links == 'true') 23 -#set ($checkboxes = $xcontext.macro.params.checkboxes == 'true') 24 -{{tree reference="path:$xwiki.getURL($xcontext.macro.doc.documentReference, 'get', $escapetool.url($resourceParams))" 25 - root="$!xcontext.macro.params.root" dragAndDrop="$editable" contextMenu="$editable" icons="$isFullWidthAvailable" 26 - edges="$isFullWidthAvailable" links="$links" checkboxes="$checkboxes" /}} 8 +{{html clean="false"}} 9 +#prepareTreeOptions($options) 10 +#documentTree($options) 11 +{{/html}} 27 27 {{/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[10]
-
- Parameter description
-
... ... @@ -1,1 +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. 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
- XWiki.WikiMacroParameterClass[14]
-
- Parameter description
-
... ... @@ -1,0 +1,1 @@ 1 +The id of the node to open the tree to. All the ancestors of the specified node, up to the root of the tree, will be opened also. The format of the node id is the one used for the root parameter. - Parameter mandatory
-
... ... @@ -1,0 +1,1 @@ 1 +No - Parameter name
-
... ... @@ -1,0 +1,1 @@ 1 +openTo
- XWiki.WikiMacroParameterClass[15]
-
- Parameter default value
-
... ... @@ -1,0 +1,1 @@ 1 +true - Parameter description
-
... ... @@ -1,0 +1,1 @@ 1 +Show only the wiki, space and document nodes for which the current user has view right. If this is set to false then the wiki, space and document nodes that are not viewable by the current user are listed in the tree using their names. The user won't be able to see their content by following their links though (the user will just be aware of their existence). - Parameter mandatory
-
... ... @@ -1,0 +1,1 @@ 1 +No - Parameter name
-
... ... @@ -1,0 +1,1 @@ 1 +showOnlyViewable
- XWiki.WikiMacroParameterClass[16]
-
- Parameter description
-
... ... @@ -1,0 +1,1 @@ 1 +Show only the documents that have an object of the specified type. The value of this parameter is the full name of an XWiki document that holds a class definition. For example, 'Blog.CategoryClass' can be used to show only the documents that represent blog categories. Leave this parameter empty if you don't want to restrict the type of documents shown in the tree. - Parameter mandatory
-
... ... @@ -1,0 +1,1 @@ 1 +No - Parameter name
-
... ... @@ -1,0 +1,1 @@ 1 +filterByClass
- XWiki.WikiMacroParameterClass[17]
-
- Parameter default value
-
... ... @@ -1,0 +1,1 @@ 1 +false - Parameter description
-
... ... @@ -1,0 +1,1 @@ 1 +Show a text input that can be used to find tree nodes. The input is displayed above the tree and offers suggestions as you type based on the content of the tree. When a suggestion is selected the tree is expanded up to the corresponding node. - Parameter mandatory
-
... ... @@ -1,0 +1,1 @@ 1 +No - Parameter name
-
... ... @@ -1,0 +1,1 @@ 1 +finder
- 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
- XWiki.WikiMacroParameterClass[19]
-
- Parameter default value
-
... ... @@ -1,0 +1,1 @@ 1 +true - Parameter description
-
... ... @@ -1,0 +1,1 @@ 1 +Set this parameter to false if you want to include the hidden documents in the tree. Otherwise, if the value is true, the hidden documents are excluded or included based on current user's preferences. - Parameter mandatory
-
... ... @@ -1,0 +1,1 @@ 1 +No - Parameter name
-
... ... @@ -1,0 +1,1 @@ 1 +filterHiddenDocuments
- XWiki.WikiMacroParameterClass[20]
-
- Parameter default value
-
... ... @@ -1,0 +1,1 @@ 1 +15 - Parameter description
-
... ... @@ -1,0 +1,1 @@ 1 +The maximum number of child nodes to display when expanding a parent node for the first time. The rest of the child nodes are accessible through a "more ..." link. This parameter is basically used to paginate the child nodes and thus helps the tree scale when the number of child nodes is large. - Parameter mandatory
-
... ... @@ -1,0 +1,1 @@ 1 +No - Parameter name
-
... ... @@ -1,0 +1,1 @@ 1 +limit
- XWiki.WikiMacroParameterClass[21]
-
- Parameter description
-
... ... @@ -1,0 +1,1 @@ 1 +The list of nodes to exclude from the tree. The nodes are specified by their id and separated by comma. - Parameter mandatory
-
... ... @@ -1,0 +1,1 @@ 1 +No - Parameter name
-
... ... @@ -1,0 +1,1 @@ 1 +exclusions