{function name=menu level=0}
		{foreach $data as $item}
			
			{if $item.subtree}
				<li class="{if $level>0}dropdown-submenu{else}dropdown{/if}">
					<a class="dropdown-toggle" aria-expanded="false" aria-haspopup="true" role="button" data-toggle="dropdown" href='{url href=$item.path}'>
						{$item.name|escape}
						<span class="caret"></span>
					</a>
					<ul class="dropdown-menu multi-level">
						{call name=menu data=$item.subtree level=$level+1}
					</ul>
				</li>
			{else}
				<li{if $item.active} class="active"{/if}>
				{if $item.path}<a href='{url href=$item.path}' >{$item.name|escape}</a>{else}{$item.name|escape}{/if}
			{/if}
			</li>
		{/foreach}
{/function}

<ul class="nav navbar-nav">
	{menu data=$tree}
</ul>