Modifications pour le document Rangee Index

Modifié par Tobias Wintrich le 2025/10/31 08:26

Depuis la version 10.30
modifié par Tobias Wintrich
sur 2021/09/28 08:37
Commentaire de modification : Il n'y a aucun commentaire pour cette version
À la version 8.4
modifié par Tobias Wintrich
sur 2021/09/27 14:58
Commentaire de modification : Il n'y a aucun commentaire pour cette version

Résumé

Détails

XWiki.WikiMacroClass[0]
Code de la macro
... ... @@ -1,63 +1,34 @@
1 -
1 +{{tree links="true"}}
2 2  {{velocity}}
3 3  {{html wiki=true}}
4 -#set($query="where doc.fullName='Handbücher.10\.00.Admin Guide 10\.00.WebHome'")
5 5  <ul>
6 - #set($results = false)
7 - #set ($query = $services.query.xwql('where doc.parent = :doc'))
8 - #set($results = $query.bindValue('doc', $doc.document).execute())
9 - $results
10 - #foreach($docname in $results)
11 - #set($rdoc = $xwiki.getDocument($docname).getTranslatedDocument())
12 - <li>
13 - [[$rdoc.getDisplayTitle()>>$rdoc.fullName]]
14 - </li>
15 - #set($query2="where doc.parent='$rdoc' order by doc.title asc")
16 - #set($results2 = false)
17 - #set($results2 = $xwiki.searchDocuments($query2))
18 - <ul>
19 - #foreach($rdoc in $results2)
20 - #set($rdoc2 = $xwiki.getDocument($rdoc).getTranslatedDocument())
21 - <li>
22 - [[$rdoc2.getDisplayTitle()>>$rdoc2.fullName]]
23 - </li>
24 - #set($query3="where doc.parent='$rdoc2'")
25 - #set($results3 = false)
26 - #set($results3 = $xwiki.searchDocuments($query3, 0, 0))
27 - <ul>
28 - #foreach($rdoc2 in $results3)
29 - #set($rdoc3 = $xwiki.getDocument($rdoc2).getTranslatedDocument())
30 - <li>
31 - [[$rdoc3.getDisplayTitle()>>$rdoc3.fullName]]
32 - </li>
33 - #set($query4="where doc.parent='$rdoc3'")
34 - #set($results4 = false)
35 - #set($results4 = $xwiki.searchDocuments($query4, 10, 0))
36 - <ul>
37 - #foreach($rdoc3 in $results4)
38 - #set($rdoc4 = $xwiki.getDocument($rdoc3).getTranslatedDocument())
39 - <li>
40 - [[$rdoc4.getDisplayTitle()>>$rdoc4.fullName]]
41 - </li>
42 - #set($query5="where doc.parent='$rdoc4'")
43 - #set($results5 = false)
44 - #set($results5 = $xwiki.searchDocuments($query5, 10, 0))
45 - <ul>
46 - #foreach($rdoc4 in $results5)
47 - #set($rdoc5 = $xwiki.getDocument($rdoc4).getTranslatedDocument())
48 - <li>
49 - [[$rdoc5.getDisplayTitle()>>$rdoc5.fullName]]
50 - </li>
51 - #end
52 - </ul>
53 - #end
54 - </ul>
55 - #end
56 - </ul>
57 - #end
58 - </ul>
59 - #end
5 +#foreach ($child in $doc.getChildren())
6 + <li class="jstree-open">
7 + [[$child]]
8 + <ul>
9 + #foreach ($subchild in $xwiki.getDocument($child).getChildren())
10 + <li class="jstree-open">
11 + [[$subchild]]
12 + <ul>
13 + #foreach ($subsubchild in $xwiki.getDocument($subchild).getChildren())
14 + <li class="jstree-open">
15 + [[$subsubchild]]
16 + <ul>
17 + #foreach ($subsubsubchild in $xwiki.getDocument($subsubchild).getChildren())
18 + <li class="jstree-open">
19 + [[$subsubsubchild]]
20 + </li>
21 + #end
22 + </ul>
23 + </li>
24 + #end
25 + </ul>
26 + </li>
27 + #end
28 + </ul>
29 + </li>
30 +#end
60 60  </ul>
61 -
62 62  {{/html}}
63 63  {{/velocity}}
34 +{{/tree}}
XWiki.WikiMacroParameterClass[15]
Valeur par défaut du paramètre
... ... @@ -1,0 +1,1 @@
1 +true
Description du paramètre
... ... @@ -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).
Paramètre obligatoire
... ... @@ -1,0 +1,1 @@
1 +Non
Nom du paramètre
... ... @@ -1,0 +1,1 @@
1 +showOnlyViewable
XWiki.WikiMacroParameterClass[16]
Description du paramètre
... ... @@ -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.
Paramètre obligatoire
... ... @@ -1,0 +1,1 @@
1 +Non
Nom du paramètre
... ... @@ -1,0 +1,1 @@
1 +filterByClass
XWiki.WikiMacroParameterClass[17]
Valeur par défaut du paramètre
... ... @@ -1,0 +1,1 @@
1 +false
Description du paramètre
... ... @@ -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.
Paramètre obligatoire
... ... @@ -1,0 +1,1 @@
1 +Non
Nom du paramètre
... ... @@ -1,0 +1,1 @@
1 +finder
XWiki.WikiMacroParameterClass[18]
Valeur par défaut du paramètre
... ... @@ -1,0 +1,1 @@
1 +false
Description du paramètre
... ... @@ -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.
Paramètre obligatoire
... ... @@ -1,0 +1,1 @@
1 +Non
Nom du paramètre
... ... @@ -1,0 +1,1 @@
1 +showRoot
XWiki.WikiMacroParameterClass[19]
Valeur par défaut du paramètre
... ... @@ -1,0 +1,1 @@
1 +true
Description du paramètre
... ... @@ -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.
Paramètre obligatoire
... ... @@ -1,0 +1,1 @@
1 +Non
Nom du paramètre
... ... @@ -1,0 +1,1 @@
1 +filterHiddenDocuments
XWiki.WikiMacroParameterClass[20]
Valeur par défaut du paramètre
... ... @@ -1,0 +1,1 @@
1 +15
Description du paramètre
... ... @@ -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.
Paramètre obligatoire
... ... @@ -1,0 +1,1 @@
1 +Non
Nom du paramètre
... ... @@ -1,0 +1,1 @@
1 +limit
XWiki.WikiMacroParameterClass[21]
Description du paramètre
... ... @@ -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.
Paramètre obligatoire
... ... @@ -1,0 +1,1 @@
1 +Non
Nom du paramètre
... ... @@ -1,0 +1,1 @@
1 +exclusions