Changes for page Rangee Index

Last modified by Tobias Wintrich on 2025/06/04 09:20

From version 9.14
edited by Tobias Wintrich
on 2021/09/27 21:04
Change comment: There is no comment for this version
To version 12.4
edited by Tobias Wintrich
on 2021/09/28 10:26
Change comment: There is no comment for this version

Summary

Details

XWiki.WikiMacroClass[0]
Context elements
... ... @@ -1,0 +1,1 @@
1 +Sprache
Macro code
... ... @@ -1,14 +2,84 @@
1 -{{tree links="true" icons="false" edges="false"}}
2 2  {{velocity}}
2 +##{{tree links="true" edges="false"}}
3 +#set($depth = $wikimacro.parameters.depth)
3 3  {{html wiki=true}}
4 -#set($query="where doc.fullName='Handbücher.10\.00.Admin Guide 10\.00.WebHome'")
5 +<ul>
5 5   #set($results = false)
6 - #set($results = $xwiki.searchDocuments($query, 10, 0))
7 + #set ($query = $services.query.xwql('where doc.parent = :doc and doc.hidden = 0 order by doc.title asc'))
8 + #set($results = $query.bindValue('doc', $doc.fullName).addFilter('currentlanguage').execute())
7 7   #foreach($docname in $results)
8 - [[$xwiki.getDocument($docname).getTranslatedDocument()]]
9 - hu
10 - #end
10 + #set($rdoc = $xwiki.getDocument($docname).getTranslatedDocument())
11 + <li class="
12 + #if ($depth > 0)
13 + jstree-open
14 + #end
15 + ">
16 + [[$rdoc.getDisplayTitle()>>$rdoc.fullName]]
17 + </li>
18 + #set($results2 = false)
19 + #set($query2 = $services.query.xwql('where doc.parent=:doc and doc.hidden = 0 order by doc.title asc'))
20 + #set($results2 = $query2.bindValue('doc', $docname).addFilter('currentlanguage').execute())
21 + $results2
22 + <ul>
23 + #foreach($rdoc in $results2)
24 + #set($rdoc2 = $xwiki.getDocument($rdoc).getTranslatedDocument())
25 + <li class="
26 + #if ($depth > 1)
27 + jstree-open
28 + #end
29 + ">
30 + [[$rdoc2.getDisplayTitle()>>$rdoc2.fullName]]
31 + </li>
32 + #set($results3 = false)
33 + #set($query3 = $services.query.xwql('where doc.parent=:doc and doc.hidden = 0 order by doc.title asc'))
34 + #set($results3 = $query3.bindValue('doc', $rdoc).addFilter('currentlanguage').execute())
35 + <ul>
36 + #foreach($rdoc2 in $results3)
37 + #set($rdoc3 = $xwiki.getDocument($rdoc2).getTranslatedDocument())
38 + <li class="
39 + #if ($depth > 2)
40 + jstree-open
41 + #end
42 + ">
43 + [[$rdoc3.getDisplayTitle()>>$rdoc3.fullName]]
44 + </li>
45 + #set($results4 = false)
46 + #set($query4 = $services.query.xwql('where doc.parent=:doc and doc.hidden = 0 order by doc.title asc'))
47 + #set($results4 = $query4.bindValue('doc', $rdoc2).addFilter('currentlanguage').execute())
48 + <ul>
49 + #foreach($rdoc3 in $results4)
50 + #set($rdoc4 = $xwiki.getDocument($rdoc3).getTranslatedDocument())
51 + <li class="
52 + #if ($depth > 3)
53 + jstree-open
54 + #end
55 + ">
56 + [[$rdoc4.getDisplayTitle()>>$rdoc4.fullName]]
57 + </li>
58 + #set($results5 = false)
59 + #set($query5 = $services.query.xwql('where doc.parent=:doc and doc.hidden = 0 order by doc.title asc'))
60 + #set($results5 = $query3.bindValue('doc', $rdoc3).addFilter('currentlanguage').execute())
61 + <ul>
62 + #foreach($rdoc4 in $results5)
63 + #set($rdoc5 = $xwiki.getDocument($rdoc4).getTranslatedDocument())
64 + <li class="
65 + #if ($depth > 4)
66 + jstree-open
67 + #end
68 + ">
69 + [[$rdoc5.getDisplayTitle()>>$rdoc5.fullName]]
70 + </li>
71 + #end
72 + </ul>
73 + #end
74 + </ul>
75 + #end
76 + </ul>
77 + #end
78 + </ul>
79 + #end
80 +</ul>
11 11  
12 12  {{/html}}
83 +##{{/tree}}
13 13  {{/velocity}}
14 -{{/tree}}
XWiki.WikiMacroParameterClass[0]
Parameter default value
... ... @@ -1,0 +1,1 @@
1 +5
Parameter description
... ... @@ -1,0 +1,1 @@
1 +Öffne bis Ebene (0-5)
Parameter mandatory
... ... @@ -1,0 +1,1 @@
1 +No
Parameter name
... ... @@ -1,0 +1,1 @@
1 +depth