#{list items: _menu_top_list, as: 'mi'} %{ def showByContext = _menu_context == null || _menu_context.equalsIgnoreCase(mi.context) def showBylabel = _menu_label == null || mi.hasLabel(_menu_label) def showGlobal = !_menu_no_global && mi.hasLabel('_global') def showMenu = showGlobal || showByContext && showBylabel }% #{if _menu_debug}
    ${mi}
    _menu_no_global: ${_menu_no_global}
    _menu_context: ${_menu_context}
    tg_global: ${mi.hasLabel('_global')}
    showGlobal: ${showGlobal}
    showByContext: ${showByContext}
    showBylabel: ${showBylabel}
    showMenu: ${showMenu}
    #{/if} #{if showMenu} %{ def url = mi.url?.split('\\?')[0] def cls = mi.cssClass ? mi.cssClass + " " : "" def isCur = url.endsWith(_menu_current?.split('\\?')[0]) cls+=isCur?"_menu_current":""; cls+=mi.subMenus.size()>0?" _menu_expanded":"" def clsStr = "class='"+cls+"'" }%
  • #{if mi.url != null && !isCur} #{/if} ${messages.get(mi.name)} #{if mi.url != null && !isCur} #{/if} #{if mi.subMenus.size() > 0} #{menu.menu_ menu_top_list:mi.subMenus, menu_current: _menu_current, menu_context: _menu_context, menu_label: _menu_label, menu_no_global: _menu_no_global/} #{/if}
  • #{/if} #{/list}