Changes for page Rangee Index

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

From version 12.23
edited by Tobias Wintrich
on 2021/09/28 11:55
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
... ... @@ -2,16 +2,15 @@
2 2  {{tree links="true" edges="false"}}
3 3  #set($depth = $wikimacro.parameters.depth)
4 4  {{html wiki=true}}
5 -$doc.getLanguage()
6 6  <ul>
7 7   #set($results = false)
8 8   #set ($query = $services.query.xwql('where doc.parent = :doc and doc.hidden = 0 order by doc.title asc'))
9 - #set($results = $query.bindValue('doc', $doc.fullName).addFilter('currentlanguage').execute())
8 + #set($results = $query.bindValue('doc', $doc.fullName).addFilter('currentlanguage').execute())
10 10   #foreach($docname in $results)
11 11   #set($rdoc = $xwiki.getDocument($docname).getTranslatedDocument())
12 - <li class="$rdoc.getLanguage()
11 + <li class="
13 13   #if ($depth > 0)
14 - jstree-open
13 + jstree-open $depth
15 15   #end
16 16   ">
17 17   [[$rdoc.getDisplayTitle()>>$rdoc.fullName]]
... ... @@ -22,9 +22,9 @@
22 22   <ul>
23 23   #foreach($rdoc in $results2)
24 24   #set($rdoc2 = $xwiki.getDocument($rdoc).getTranslatedDocument())
25 - <li class="$rdoc.getLanguage()
24 + <li class="
26 26   #if ($depth > 1)
27 - jstree-open
26 + jstree-open $depth
28 28   #end
29 29   ">
30 30   [[$rdoc2.getDisplayTitle()>>$rdoc2.fullName]]
... ... @@ -37,7 +37,7 @@
37 37   #set($rdoc3 = $xwiki.getDocument($rdoc2).getTranslatedDocument())
38 38   <li class="
39 39   #if ($depth > 2)
40 - jstree-open
39 + jstree-open $depth
41 41   #end
42 42   ">
43 43   [[$rdoc3.getDisplayTitle()>>$rdoc3.fullName]]
... ... @@ -50,7 +50,7 @@
50 50   #set($rdoc4 = $xwiki.getDocument($rdoc3).getTranslatedDocument())
51 51   <li class="
52 52   #if ($depth > 3)
53 - jstree-open
52 + jstree-open $depth
54 54   #end
55 55   ">
56 56   [[$rdoc4.getDisplayTitle()>>$rdoc4.fullName]]