Changes for page Navigation

Last modified by Benjamin Fischer on 2025/06/03 16:18

From version 22.6
edited by Benjamin Fischer
on 2025/01/06 15:16
Change comment: There is no comment for this version
To version 20.1
edited by Benjamin Fischer
on 2024/12/09 15:31
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -1,6 +1,6 @@
1 1  {{velocity}}
2 2  {{html wiki="true"}}
3 -#macro (navItem $rootName $depth=4 $childsMax=10 $childsMin=1 $level=1)
3 +#macro (navItem $rootName $depth=4 $childsMax=15 $childsMin=1 $level=1)
4 4   #set ($rootDoc = $xwiki.getDocument($rootName))
5 5   #set ($canView = $rootDoc.hasAccess("view"))
6 6   #if ($canView)
... ... @@ -7,7 +7,7 @@
7 7   #set ($children = $rootDoc.getChildren())
8 8   #set ($nChilds = $children.size())
9 9   #set ($hasChilds = (($level < $depth) && ($nChilds > 0)))
10 - <li#if($childsMin < $nChilds && $nChilds < $childsMax) class="open"#end>#if($rootDoc.getContent().isEmpty()&&$hasChilds) $rootDoc.plainTitle #else [[$rootDoc.plainTitle>>$rootDoc.fullName]] #end#if($hasChilds)<ul>#foreach($child in $children)#navItem ($child, $depth, $mathtool.sub($childsMax, 3), $childsMin, $mathtool.add($level, 1))#end</ul>#end</li>
10 + <li#if($childsMin < $nChilds && $nChilds < $childsMax) class="open"#end>#if($rootDoc.getContent().isEmpty()&&$hasChilds) $rootDoc.plainTitle #else [[$rootDoc.plainTitle>>$rootDoc.fullName]] #end#if($hasChilds)<ul>#foreach($child in $children)#navItem ($child, $depth, $mathtool.sub($childsMax, $nChilds), $childsMin, $mathtool.add($level, 1))#end</ul>#end</li>
11 11   #end
12 12  #end
13 13  * [[{{icon name="home"/}}Home>>Main.WebHome]]
... ... @@ -17,7 +17,6 @@
17 17  <li><br/></li>
18 18  #navItem ("DIG-UM.WebHome")
19 19  #navItem ("Internal.WebHome")
20 -<li>[[ErUM-Data Call (2025)>>https://erumdatahub.de/calls/]]</li>
21 21  #if ($hasEdit)
22 22  <li><br/></li>
23 23  <li class="open">{{icon name="question"/}} Help<ul>
XWiki.StyleSheetExtension[0]
Code
... ... @@ -1,18 +1,4 @@
1 1  .panel .menu.menu-vertical {
2 - > ul {
3 - > li > *:first-child {
4 - font-weight: bold;
5 - }
6 - ul {
7 - list-style-type: disc;
8 - ul {
9 - list-style-type: circle;
10 - ul {
11 - list-style-type: square;
12 - }
13 - }
14 - }
15 - }
16 16   li {
17 17   padding: 0.05em;
18 18   }