Changes for page Rangee Index

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

From version 12.29
edited by Tobias Wintrich
on 2021/09/28 12:00
Change comment: There is no comment for this version
To version 11.10
edited by Tobias Wintrich
on 2021/09/28 10:22
Change comment: There is no comment for this version

Summary

Details

XWiki.WikiMacroClass[0]
Macro code
... ... @@ -1,24 +1,18 @@
1 1  {{velocity}}
2 -##{{tree links="true" edges="false"}}
2 +{{tree links="true" edges="false"}}
3 3  #set($depth = $wikimacro.parameters.depth)
4 -#if ($xcontext.locale != 'de')
5 - #set($locale = '')
6 -#else
7 - #set($locale = $xcontext.locale)
8 -#end
9 9  {{html wiki=true}}
10 -language $locale
11 11  <ul>
12 12   #set($results = false)
13 13   #set ($query = $services.query.xwql('where doc.parent = :doc and doc.hidden = 0 order by doc.title asc'))
14 - #set($results = $query.bindValue('doc', $doc.fullName).addFilter('currentlanguage').execute())
8 + #set($results = $query.bindValue('doc', $doc.fullName).addFilter('currentlanguage').execute())
15 15   #foreach($docname in $results)
16 16   #set($rdoc = $xwiki.getDocument($docname).getTranslatedDocument())
17 - <li class="$rdoc.getLanguage()
11 + <li class="
18 18   #if ($depth > 0)
19 19   jstree-open
20 20   #end
21 - ">
15 + ">$depth
22 22   [[$rdoc.getDisplayTitle()>>$rdoc.fullName]]
23 23   </li>
24 24   #set($results2 = false)
... ... @@ -27,11 +27,11 @@
27 27   <ul>
28 28   #foreach($rdoc in $results2)
29 29   #set($rdoc2 = $xwiki.getDocument($rdoc).getTranslatedDocument())
30 - <li class="$rdoc.getLanguage()
24 + <li class="
31 31   #if ($depth > 1)
32 32   jstree-open
33 33   #end
34 - ">
28 + ">$depth
35 35   [[$rdoc2.getDisplayTitle()>>$rdoc2.fullName]]
36 36   </li>
37 37   #set($results3 = false)
... ... @@ -44,7 +44,7 @@
44 44   #if ($depth > 2)
45 45   jstree-open
46 46   #end
47 - ">
41 + ">$depth
48 48   [[$rdoc3.getDisplayTitle()>>$rdoc3.fullName]]
49 49   </li>
50 50   #set($results4 = false)
... ... @@ -85,5 +85,5 @@
85 85  </ul>
86 86  
87 87  {{/html}}
88 -##{{/tree}}
82 +{{/tree}}
89 89  {{/velocity}}