{{if $TreeData|@count gt 0}}
<ul {{if $Level eq 0}}class="treeview" id="treeview{{$CID}}"{{/if}}>
{{foreach from=$TreeData item=v key=k name=n}}{{assign var=Level value=$Level|add:'1'}}
	<li id="liitem{{$CID}}{{$v.CategoryID}}"><a id="item{{$CID}}{{$v.CategoryID}}" href="javascript: void(0);" itemid="{{$v.CategoryID}}" {{if $smarty.get.eid eq $v.CategoryID}}notselectable="1"{{else}}notselectable="0"{{/if}}>{{$v.CategoryName}}</a>{{getTreeChildNumberAdmin var=TreeData CategoryID=$v.CategoryID CID=$CID SCID=$SCID OrderCol=$OrderCol OrderWay=OrderWay DisplayColumn=$DisplayColumn Level=$Level page=$TreePageTemplate}}</li>
{{/foreach}}{{assign var=Level value=$Level|add:'-1'}}
</ul>
{{else}}{{assign var=Level value=$Level|add:'-1'}}{{/if}}