Changes for page Rangee Index

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

From version 12.28
edited by Tobias Wintrich
on 2021/09/28 11:58
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,21 +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 4  {{html wiki=true}}
5 -language
6 -$xcontext.locale
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 16   jstree-open
17 17   #end
18 - ">
15 + ">$depth
19 19   [[$rdoc.getDisplayTitle()>>$rdoc.fullName]]
20 20   </li>
21 21   #set($results2 = false)
... ... @@ -24,11 +24,11 @@
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 29   jstree-open
30 30   #end
31 - ">
28 + ">$depth
32 32   [[$rdoc2.getDisplayTitle()>>$rdoc2.fullName]]
33 33   </li>
34 34   #set($results3 = false)
... ... @@ -41,7 +41,7 @@
41 41   #if ($depth > 2)
42 42   jstree-open
43 43   #end
44 - ">
41 + ">$depth
45 45   [[$rdoc3.getDisplayTitle()>>$rdoc3.fullName]]
46 46   </li>
47 47   #set($results4 = false)
... ... @@ -82,5 +82,5 @@
82 82  </ul>
83 83  
84 84  {{/html}}
85 -##{{/tree}}
82 +{{/tree}}
86 86  {{/velocity}}