<ul id="menu{{$iMenuType}}" style="column-count:3;">
{{function name="menu_bottom_recursion" list=$aMenu sub=1}}
{{foreach from=$list item=aData}}
<li id="menub_{{$aData.iPage}}"><a href="{{$aData.sLinkName}}" {{if $aData.bSelected}}class="selected"{{/if}}>{{$aData.sName}}</a>
{{if count($aData.sub) > 0}}
	<ul class="sub{{$sub}}">
	{{menu_bottom_recursion list=$aData.sub sub=$sub+1}}
	</ul>
{{/if}}
</li>
{{/foreach}}
{{/function}}
{{menu_bottom_recursion list=$aMenu sub=1}}
</ul>