<ul id="menu3">{{function name="menu3_recursion" list=$aMenu sub=1}}{{foreach from=$list item=aData}}<li id="menu3_{{$aData.iPage}}" class="{{if $aData@last}}last{{/if}} {{if $aData.iStatus == 0}}admin{{/if}}"><a href="{{$aData.sLinkName}}" {{if $aData.bSelected}}class="selected"{{/if}}>{{$aData.sName}}{{if !empty($aData.iProductsCount)}}<span class="products-count">&nbsp;({{$aData.iProductsCount}})</span>{{/if}}</a>{{if count($aData.sub) > 0}}<ul class="sub{{$sub}}">{{menu3_recursion list=$aData.sub sub=$sub+1}}</ul>{{/if}}</li>{{/foreach}}{{/function}}{{menu3_recursion list=$aMenu sub=1}}</ul>