{if !isset($level)} {assign var=level value=1} {else} {assign var=level value=$level+1} {/if} {if count($children)} {if $level > 1}
{/if}

{foreach from=$children item=Child}
- {if $Child->getUrl()} {* link *} getTarget()}target="{$Child->getTarget()}"{/if} > {if count($Child->getChildren())} {* With children *} {if $Child|get_class == 'QUI\Menu\Independent\Items\Anchor' or $Child|get_class == 'QUI\Menu\Independent\Items\Site'} {if $Child->getSite() && $ActiveSite->getId() == $Child->getSite()->getId()} {else} {/if} {else} {/if} {else} {* Without children *} {/if} {if $this->getAttribute('showFirstLevelIcons') && $Child->getIcon() && $Child->getIcon()|strpos:'image.php' !== 0 } {image src=$Child->getIcon() onlyicon=1} {/if} {$Child->getTitle()} {else} {* custom event *} getType() ==='QUI\Menu\Independent\Items\Custom' && $Child->getClickEvent()}onclick="{$Child->getClickEvent()}" data-name="custom-event"{/if} > {if count($Child->getChildren())} {* With children *} {else} {* Without children *} {/if} {if $this->getAttribute('showFirstLevelIcons') && $Child->getIcon() && $Child->getIcon()|strpos:'image.php' !== 0 } {image src=$Child->getIcon() onlyicon=1} {/if} {$Child->getTitle()} {/if}
  {include file="`$FileMenu`" children=$Child->getChildren() level=$level }
{/foreach}

{if $level > 1}
{/if} {/if}