{{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'}}
	{{assign var=className value='black'}}
	{{if $v.Collection_400_3 eq 2}}{{assign var=className value='green'}}{{/if}}
	{{if $v.Collection_400_3 eq 3}}{{assign var=className value='red'}}{{/if}}
	<li id="liitem{{$CID}}{{$v.CategoryID}}">
		<a id="item{{$CID}}{{$v.CategoryID}}" href="/{{$smarty.const.ADMIN_APP_DIR}}/admin.php?module_id=1&action=update&id=400&gs=&st=&Search=Apply+Filter&FilterSave=0&FilterName=&&eid={{$v.CategoryID}}" target="_blank">
			<span class="{{$className}}">{{$v.CategoryName}}</span>
		</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}}