<ul class="menu">
{{function name="menumobile_recursion" list=$aMenu sub=1}}
{{foreach from=$list item=aData}}
<li id="menumobile_{{$aData.iPage}}" class="{{if $aData@last}}last{{/if}} {{if $aData.bSelected}}selected{{elseif $aData.bParent}}parent{{/if}} {{if count($aData.sub) > 0}}haschildren{{/if}}"><a href="{{$aData.sLinkName}}" {{if $aData.bSelected}}class="selected"{{elseif $aData.bParent}}class="parent"{{/if}}>{{$aData.sName}}</a> {{if count($aData.sub) > 0}}<a href="#" class="more"></a>{{/if}}
{{if count($aData.sub) > 0}}
	<ul class="submenu sub{{$sub}}">
	{{menumobile_recursion list=$aData.sub sub=$sub+1}}
	</ul>
{{/if}}
</li>
{{/foreach}}
{{/function}}
{{menumobile_recursion list=$aMenu sub=1}}
</ul>