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
on 2021/09/28 12:00
Change comment:
There is no comment for this version
To version 12.32
edited by Tobias Wintrich
on 2021/09/28 12:02
on 2021/09/28 12:02
Change comment:
There is no comment for this version
Summary
-
Objects (1 modified, 0 added, 0 removed)
Details
- XWiki.WikiMacroClass[0]
-
- Macro code
-
... ... @@ -1,7 +1,7 @@ 1 1 {{velocity}} 2 2 ##{{tree links="true" edges="false"}} 3 3 #set($depth = $wikimacro.parameters.depth) 4 -#if ($xcontext.locale != 'de')4 +#if ($xcontext.locale == 'de') 5 5 #set($locale = '') 6 6 #else 7 7 #set($locale = $xcontext.locale) ... ... @@ -14,13 +14,15 @@ 14 14 #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() 18 - #if ($depth > 0) 19 - jstree-open 17 + #if ($locale == $rdoc.getLanguage()) 18 + <li class=" 19 + #if ($depth > 0) 20 + jstree-open 21 + #end 22 + "> 23 + [[$rdoc.getDisplayTitle()>>$rdoc.fullName]] 24 + </li> 20 20 #end 21 - "> 22 - [[$rdoc.getDisplayTitle()>>$rdoc.fullName]] 23 - </li> 24 24 #set($results2 = false) 25 25 #set($query2 = $services.query.xwql('where doc.parent=:doc and doc.hidden = 0 order by doc.title asc')) 26 26 #set($results2 = $query2.bindValue('doc', $docname).addFilter('currentlanguage').execute()) ... ... @@ -27,13 +27,15 @@ 27 27 <ul> 28 28 #foreach($rdoc in $results2) 29 29 #set($rdoc2 = $xwiki.getDocument($rdoc).getTranslatedDocument()) 30 - <li class="$rdoc.getLanguage() 31 - #if ($depth > 1) 32 - jstree-open 33 - #end 34 - "> 35 - [[$rdoc2.getDisplayTitle()>>$rdoc2.fullName]] 36 - </li> 32 + #if ($locale == $rdoc.getLanguage()) 33 + <li class="$rdoc.getLanguage() 34 + #if ($depth > 1) 35 + jstree-open 36 + #end 37 + "> 38 + [[$rdoc2.getDisplayTitle()>>$rdoc2.fullName]] 39 + </li> 40 + #end 37 37 #set($results3 = false) 38 38 #set($query3 = $services.query.xwql('where doc.parent=:doc and doc.hidden = 0 order by doc.title asc')) 39 39 #set($results3 = $query3.bindValue('doc', $rdoc).addFilter('currentlanguage').execute())