1: #set ($showTitle = true) 2: #if ($request.getParameter("showTitle") == false) 3: #set ($showTitle = false) 4: #end 5: 6: #set ($primary = true) 7: #if ($request.getParameter("primary") == false) 8: #set ($primary = false) 9: #end 10: 11: #set ($moreAfter = $tool.math.add($entries.size(), 1)) ## don't render a more link by default 12: #if ($tool.math.toInteger($request.getParameter("moreAfter")) <= $tool.math.sub($entries.size(), 2) && $primary) 13: #set ($moreAfter = $tool.math.toInteger($request.getParameter("moreAfter"))) 14: #end 15: 16: #set ($class = "navbar-links") 17: #if ($request.getParameter("class")) 18: #set ($class = $request.getParameter("class")) 19: #end 20: 21: #macro (printLinks) 22: 23: <ul class="clearfix" role="menu"> 24: #foreach ($entry in $entries) 25: #set ($class="") 26: #if ($entry.match) 27: #set ($class = "match") 28: #end 29: 30: #if ($entry.secondaryURL.length() > 1) 31: #if ($entry.match) 32: #set ($class = "has-nav match") 33: #else 34: #set ($class = "has-nav") 35: #end 36: #end 37: 38: <li #if ($class.length() > 0) class="$class" #end> 39: <a href="$entry.targetURL" #if ($website.isExternalLink($entry.targetURL)) target="_blank" #end 40: #if (!$entry.hideTitle && $entry.title.length() > 0) title="$entry.title" #end 41: >$entry.label</a> 42: #if ($entry.secondaryURL.length() > 0) 43: $website.includeAgain("${entry.secondaryURL}?primary=false") 44: #end 45: </li> 46: #if ($velocityCount == $moreAfter) 47: <li class="has-nav more"><a tabindex="0" role="button" aria-label="press tab to read additional links">More+</a> 48: <ul class="clearfix"> 49: #end 50: #if ($velocityCount == $entries.size() && $moreAfter < $entries.size()) 51: </ul> 52: </li> 53: #end 54: #end 55: 56: #if ($wiki.valid()) 57: <li>$wiki</li> 58: #end 59: </ul> 60: 61: #end ## printLinks 62: 63: #if ($entries.size() > 0) 64: #if ($primary) 65: 66: <div class="${class} clearfix" role="menubar" data-module="nav"> 67: <div class="clearfix"> 68: 69: #if ($page.title.length() > 0 && $showTitle) 70: <h1>$page.title</h1> 71: #end 72: 73: #printLinks 74: 75: </div> 76: $wiki 77: </div> 78: 79: #else 80: 81: #printLinks 82: 83: #end 84: #end ## size check