phpcms根据二级栏目列表写的三级栏目列表
1 <div class="container"> 2 <!--左边树状导航--> 3 <div class="CNLTreeMenu" id="CNLTreeMenu1"> 4 <ul> 5 {loop subcat($catid) $c} 6 <li class="Opened"><a href="{$c[url]}">{$c['catname']}</a> 7 <ul> 8 {if $c['child']} 9 {php $child = subcat($c['catid']);} 10 {loop $child $catc} 11 <li class="Opened"><a title="{$catc['catname']}" href="{$c['url']}" target="_blank">{$catc['catname']}</a> 12 <ul> 13 {if $child[$catc['catid']]['child']} 14 {php $child2 = subcat($catc['catid']);} 15 {loop $child2 $catc2} 16 <li class="Child"><a href="{$cate['url']}">{$catc2['catname']}</a></li> 17 {/loop} 18 {/if} 19 </ul> 20 </li> 21 {/loop} 22 </ul></li>{/if}{/loop}</ul> 23 </div>