Wiki source code of Navigation
Version 2.3 by Benjamin Fischer on 2024/10/24 11:35
Show last authors
author | version | line-number | content |
---|---|---|---|
1 | * [[{{displayIcon name="home"/}} Home>>Main.WebHome]] | ||
2 | * ---- | ||
3 | * [[{{displayIcon name="book"/}} Material collection>>Material collection.WebHome]] | ||
4 | * [[{{displayIcon name="address-book"/}} People in ErUM>>People in ErUM.WebHome]] | ||
5 | * ---- | ||
6 | {{velocity}} | ||
7 | #set ($depth = 3) | ||
8 | #set ($limit = 10) | ||
9 | #macro (navItem $rootName $level) | ||
10 | #set ($rootDoc = $xwiki.getDocument($rootName)) | ||
11 | #set ($canView = $rootDoc.hasAccess("view")) | ||
12 | #if ($canView) | ||
13 | $stringtool.repeat('*', $level) {{html}}<a href="$rootDoc.getURL()">$escapetool.xml($rootDoc.plainTitle)</a>{{/html}} | ||
14 | #if ($level < $depth) | ||
15 | #foreach ($child in $rootDoc.getChildren($limit, 0)) | ||
16 | #navItem ($child $mathtool.add($level, 1)) | ||
17 | #end | ||
18 | #end | ||
19 | #end | ||
20 | #end | ||
21 | #navItem ("DIG-UM.WebHome", 1) | ||
22 | #navItem ("Internal.WebHome", 1) | ||
23 | #if ($hasEdit) | ||
24 | * ---- | ||
25 | * {{displayIcon name="question"/}} Help | ||
26 | ** [[XWiki Syntax Guide>>XWiki.XWikiSyntax]] | ||
27 | ** [[{{displayIcon name="font-awesome"/}} FontAwesome Icons>>https://fontawesome.com/v4/icons/]] | ||
28 | #end | ||
29 | {{/velocity}} |