Changes for page Rangee Index

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

From version 12.2
edited by Tobias Wintrich
on 2021/09/28 10:26
Change comment: There is no comment for this version
To version 12.17
edited by Tobias Wintrich
on 2021/09/28 11:47
Change comment: There is no comment for this version

Summary

Details

XWiki.WikiMacroClass[0]
Macro code
... ... @@ -5,8 +5,7 @@
5 5  <ul>
6 6   #set($results = false)
7 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())
9 - $results
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 12   <li class="
... ... @@ -14,11 +14,11 @@
14 14   jstree-open
15 15   #end
16 16   ">
17 - [[$rdoc.getDisplayTitle()>>$rdoc.fullName]]
16 + [[$rdoc.getDisplayTitle()>>$rdoc.fullName $rdoc.getLanguage()]]
18 18   </li>
19 19   #set($results2 = false)
20 20   #set($query2 = $services.query.xwql('where doc.parent=:doc and doc.hidden = 0 order by doc.title asc'))
21 - #set($results2 = $query2.bindValue('doc', $docname).addFilter('currentlanguage').execute())
20 + #set($results2 = $query2.bindValue('doc', $docname).addFilter('currentlanguage').execute())
22 22   <ul>
23 23   #foreach($rdoc in $results2)
24 24   #set($rdoc2 = $xwiki.getDocument($rdoc).getTranslatedDocument())
... ... @@ -27,7 +27,7 @@
27 27   jstree-open
28 28   #end
29 29   ">
30 - [[$rdoc2.getDisplayTitle()>>$rdoc2.fullName]]
29 + [[$rdoc2.getDisplayTitle()>>$rdoc2.fullName $rdoc.getLanguage()]]
31 31   </li>
32 32   #set($results3 = false)
33 33   #set($query3 = $services.query.xwql('where doc.parent=:doc and doc.hidden = 0 order by doc.title asc'))