#{if _show_label && _menu_label}
  • ${messages.get(_menu_label)}
  • #{/if} #{list items: _menu_top_list, as: 'mi'} %{ def showBylabel = mi.hasLabel(_menu_label) def showGlobal = !_menu_no_global && mi.hasLabel('_global') def showMenu = showGlobal || showBylabel def url = _menu_editing ? _menu_editing_url + '?id=' + mi._getId() : play.modules.menu.MenuPlugin.url(mi) def plugin = play.modules.menu.MenuPlugin.instance() def subMenus = plugin.getSubMenus(mi) }% #{if _menu_debug}
    ${mi}
    _menu_no_global: ${_menu_no_global}
    tg_global: ${mi.hasLabel('_global')}
    showGlobal: ${showGlobal}
    \ showBylabel: ${showBylabel}
    showMenu: ${showMenu}
    isCurrent: ${url?.endsWith(_menu_current?.split('\\?')[0])}
    #{/if} #{if showMenu} %{ def cls = mi.cssClass ? mi.cssClass + " " : "" if (url) { url = url.split('\\?')[0] def isCur = url.endsWith(_menu_current?.split('\\?')[0]) cls+=isCur?"_menu_current":""; } cls+=subMenus.size()>0?" _menu_expanded":"" def clsStr = "class='"+cls+"'" }%
  • #{if url != null && !isCur} #{/if} ${messages.get(mi.name)} #{if url != null && !isCur} #{/if} #{if subMenus.size() > 0} #{menu.menu_ menu_top_list:subMenus, menu_current: _menu_current, menu_label: _menu_label, menu_no_global: _menu_no_global/} #{/if}
  • #{/if} #{/list}