Changes for page Rangee Index

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

From version 12.27
edited by Tobias Wintrich
on 2021/09/28 11:57
Change comment: There is no comment for this version
To version 11.11
edited by Tobias Wintrich
on 2021/09/28 10:23
Change comment: There is no comment for this version

Summary

Details

XWiki.WikiMacroClass[0]
Macro code
... ... @@ -1,19 +1,16 @@
1 1  {{velocity}}
2 -##{{tree links="true" edges="false"}}
2 +{{tree links="true" edges="false"}}
3 3  #set($depth = $wikimacro.parameters.depth)
4 4  {{html wiki=true}}
5 -language
6 -getLanguage()
7 -$doc.getLanguage()
8 8  <ul>
9 9   #set($results = false)
10 10   #set ($query = $services.query.xwql('where doc.parent = :doc and doc.hidden = 0 order by doc.title asc'))
11 - #set($results = $query.bindValue('doc', $doc.fullName).addFilter('currentlanguage').execute())
8 + #set($results = $query.bindValue('doc', $doc.fullName).addFilter('currentlanguage').execute())
12 12   #foreach($docname in $results)
13 13   #set($rdoc = $xwiki.getDocument($docname).getTranslatedDocument())
14 - <li class="$rdoc.getLanguage()
11 + <li class="
15 15   #if ($depth > 0)
16 - jstree-open
13 + jstree-open $depth
17 17   #end
18 18   ">
19 19   [[$rdoc.getDisplayTitle()>>$rdoc.fullName]]
... ... @@ -24,9 +24,9 @@
24 24   <ul>
25 25   #foreach($rdoc in $results2)
26 26   #set($rdoc2 = $xwiki.getDocument($rdoc).getTranslatedDocument())
27 - <li class="$rdoc.getLanguage()
24 + <li class="
28 28   #if ($depth > 1)
29 - jstree-open
26 + jstree-open $depth
30 30   #end
31 31   ">
32 32   [[$rdoc2.getDisplayTitle()>>$rdoc2.fullName]]
... ... @@ -39,7 +39,7 @@
39 39   #set($rdoc3 = $xwiki.getDocument($rdoc2).getTranslatedDocument())
40 40   <li class="
41 41   #if ($depth > 2)
42 - jstree-open
39 + jstree-open $depth
43 43   #end
44 44   ">
45 45   [[$rdoc3.getDisplayTitle()>>$rdoc3.fullName]]
... ... @@ -52,7 +52,7 @@
52 52   #set($rdoc4 = $xwiki.getDocument($rdoc3).getTranslatedDocument())
53 53   <li class="
54 54   #if ($depth > 3)
55 - jstree-open
52 + jstree-open $depth
56 56   #end
57 57   ">
58 58   [[$rdoc4.getDisplayTitle()>>$rdoc4.fullName]]
... ... @@ -82,5 +82,5 @@
82 82  </ul>
83 83  
84 84  {{/html}}
85 -##{{/tree}}
82 +{{/tree}}
86 86  {{/velocity}}