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

{foreach from=$children key=k item=Child} {if $level > 1 and $k == 0}
- {locale group='quiqqer/menu' var='mobileMenu.slideoutAdvanced.btn.back'}
{/if}
- {if $Child->getUrl()} getTarget()}target="{$Child->getTarget()}"{/if} > {$Child->getTitle()} {if count($Child->getChildren())} {/if} {else} getType() ==='QUI\Menu\Independent\Items\Custom' && $Child->getClickEvent()}onclick="{$Child->getClickEvent()}" data-name="custom-event"{/if} > {$Child->getTitle()} {if count($Child->getChildren())} {/if} {/if}
  {include file="`$FileMenu`" children=$Child->getChildren() level=$level }
{/foreach}

{/if}