%{ menuItem = _menuItem ?: _arg if (menuItem == null) { throw new NullPointerException("The menu argument is null"); } visibleChildren = menuItem.getVisibleChildren(); if (_level == null) { _level = 1 } if (_showLevels == null) { _showLevels = 99; } if (_expandLevels == null) { _expandLevels = 99; } }% #{if !visibleChildren.isEmpty() && _level <= _showLevels && (_level <= _expandLevels || menuItem.hasActiveDescendant()) } #{list items:visibleChildren, as:'child'} %{ linkClasses = [] if(child.isActive()) { linkClasses.push("active"); } if(child.hasActiveDescendant()) { linkClasses.push("activePath"); } if(child.getProperty('external')) { linkClasses.push("external"); } }%
  • #{if child.hasLink()} ${child.getText()} #{/if} #{else} ${child.getText()} #{/else} #{navigation.default child, level:_level + 1, showLevels: _showLevels, expandLevels: _expandLevels /}
  • #{/list} #{/if}