Changes for page Rangee Index
Last modified by Tobias Wintrich on 2025/06/04 09:20
From version 10.95
edited by Tobias Wintrich
on 2021/09/28 10:08
on 2021/09/28 10:08
Change comment:
There is no comment for this version
To version 12.31
edited by Tobias Wintrich
on 2021/09/28 12:01
on 2021/09/28 12:01
Change comment:
There is no comment for this version
Summary
-
Objects (2 modified, 0 added, 0 removed)
Details
- XWiki.WikiMacroClass[0]
-
- Context elements
-
... ... @@ -1,0 +1,1 @@ 1 +Sprache - Macro code
-
... ... @@ -1,16 +1,28 @@ 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 4 4 {{html wiki=true}} 10 +language $locale 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()) 14 + #set($results = $query.bindValue('doc', $doc.fullName).addFilter('currentlanguage').execute()) 9 9 #foreach($docname in $results) 10 10 #set($rdoc = $xwiki.getDocument($docname).getTranslatedDocument()) 11 - <li class="jstree-open"> 12 - [[$rdoc.getDisplayTitle()>>$rdoc.fullName]] 13 - </li> 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> 25 + #end 14 14 #set($results2 = false) 15 15 #set($query2 = $services.query.xwql('where doc.parent=:doc and doc.hidden = 0 order by doc.title asc')) 16 16 #set($results2 = $query2.bindValue('doc', $docname).addFilter('currentlanguage').execute()) ... ... @@ -17,7 +17,11 @@ 17 17 <ul> 18 18 #foreach($rdoc in $results2) 19 19 #set($rdoc2 = $xwiki.getDocument($rdoc).getTranslatedDocument()) 20 - <li class="jstree-open"> 32 + <li class="$rdoc.getLanguage() 33 + #if ($depth > 1) 34 + jstree-open 35 + #end 36 + "> 21 21 [[$rdoc2.getDisplayTitle()>>$rdoc2.fullName]] 22 22 </li> 23 23 #set($results3 = false) ... ... @@ -26,7 +26,11 @@ 26 26 <ul> 27 27 #foreach($rdoc2 in $results3) 28 28 #set($rdoc3 = $xwiki.getDocument($rdoc2).getTranslatedDocument()) 29 - <li class="jstree-open"> 45 + <li class=" 46 + #if ($depth > 2) 47 + jstree-open 48 + #end 49 + "> 30 30 [[$rdoc3.getDisplayTitle()>>$rdoc3.fullName]] 31 31 </li> 32 32 #set($results4 = false) ... ... @@ -35,7 +35,11 @@ 35 35 <ul> 36 36 #foreach($rdoc3 in $results4) 37 37 #set($rdoc4 = $xwiki.getDocument($rdoc3).getTranslatedDocument()) 38 - <li class="jstree-open"> 58 + <li class=" 59 + #if ($depth > 3) 60 + jstree-open 61 + #end 62 + "> 39 39 [[$rdoc4.getDisplayTitle()>>$rdoc4.fullName]] 40 40 </li> 41 41 #set($results5 = false) ... ... @@ -44,7 +44,11 @@ 44 44 <ul> 45 45 #foreach($rdoc4 in $results5) 46 46 #set($rdoc5 = $xwiki.getDocument($rdoc4).getTranslatedDocument()) 47 - <li class="jstree-open"> 71 + <li class=" 72 + #if ($depth > 4) 73 + jstree-open 74 + #end 75 + "> 48 48 [[$rdoc5.getDisplayTitle()>>$rdoc5.fullName]] 49 49 </li> 50 50 #end ... ... @@ -59,5 +59,5 @@ 59 59 </ul> 60 60 61 61 {{/html}} 62 -{{/tree}} 90 +##{{/tree}} 63 63 {{/velocity}}
- XWiki.WikiMacroParameterClass[0]
-
- Parameter default value
-
... ... @@ -1,1 +1,1 @@ 1 - 1001 +5 - Parameter description
-
... ... @@ -1,1 +1,1 @@ 1 -Öffne bis Ebene 1 +Öffne bis Ebene (0-5)