{assign var = foreach_name value = "menu`$level`"} {foreach from = $menu item = "menuItem" name = $foreach_name}
  • {if empty($menuItem.sub) || ($level + 1) >= 3} {$menuItem.menuTitle|htmlspecialchars}{if !empty($menuItem.sub)}  {/if} {if !empty($menuItem.sub)}
      {include file = $DOC->getTemplate('menu_item.tpl') menu = $menuItem.sub level = $level+1}
    {/if} {else} {$menuItem.menuTitle|htmlspecialchars} {/if}
  • {/foreach}