Changes for page Rangee Index
Last modified by Tobias Wintrich on 2025/10/31 08:26
From version 20.5
edited by Tobias Wintrich
on 2025/10/15 08:15
on 2025/10/15 08:15
Change comment:
There is no comment for this version
To version 20.2
edited by Tobias Wintrich
on 2025/10/15 08:13
on 2025/10/15 08:13
Change comment:
There is no comment for this version
Summary
-
Objects (1 modified, 0 added, 0 removed)
Details
- XWiki.WikiMacroClass[0]
-
- Macro code
-
... ... @@ -1,8 +1,6 @@ 1 1 {{velocity}} 2 2 {{tree links="true" edges="false"}} 3 3 #set($depth = $wikimacro.parameters.depth) 4 - 5 -## Locale bestimmen 6 6 #set($locale = '') 7 7 #if ($xcontext.locale != 'de') 8 8 #set($locale = $xcontext.locale) ... ... @@ -14,18 +14,21 @@ 14 14 #set($translatedDoc = $doc.getTranslatedDocument()) 15 15 16 16 ## Nur rendern wenn Sprache passt 17 - #if ($locale == $translatedDoc.getLanguage()) 15 + #if ($locale == '' || $locale == $translatedDoc.getLanguage()) 18 18 #set($cssClass = '') 19 - #if ($currentDepth < $depth) 17 + 18 + ## Kinder-Dokumente abfragen - OHNE currentlanguage Filter 19 + #set($childQuery = $services.query.xwql('where doc.parent = :parentDoc and doc.hidden = 0 order by doc.title asc')) 20 + #set($children = $childQuery.bindValue('parentDoc', $docFullName).execute()) 21 + 22 + ## CSS-Klasse nur wenn Kinder existieren UND Tiefe noch nicht erreicht 23 + #if ($children && $children.size() > 0 && $currentDepth < $depth) 20 20 #set($cssClass = 'jstree-open') 21 21 #end 26 + 22 22 <li class="$cssClass"> 23 23 [[$translatedDoc.getDisplayTitle()>>$translatedDoc.fullName]] 24 24 25 - ## Kinder-Dokumente abfragen 26 - #set($childQuery = $services.query.xwql('where doc.parent = :parentDoc and doc.hidden = 0 order by doc.title asc')) 27 - #set($children = $childQuery.bindValue('parentDoc', $docFullName).addFilter('currentlanguage').execute()) 28 - 29 29 ## Rekursiv rendern wenn Kinder vorhanden sind 30 30 #if ($children && $children.size() > 0 && $currentDepth < $depth) 31 31 #set($nextDepth = $currentDepth + 1) ... ... @@ -41,9 +41,9 @@ 41 41 42 42 {{html wiki=true}} 43 43 <ul> 44 - ## Root-Dokumente laden 45 + ## Root-Dokumente laden - OHNE currentlanguage Filter 45 45 #set($rootQuery = $services.query.xwql('where doc.parent = :doc and doc.hidden = 0 order by doc.title asc')) 46 - #set($rootDocs = $rootQuery.bindValue('doc', $doc.fullName). addFilter('currentlanguage').execute())47 + #set($rootDocs = $rootQuery.bindValue('doc', $doc.fullName).execute()) 47 47 48 48 #foreach($docName in $rootDocs) 49 49 #renderTreeNode($docName 1)