phpcms多级导航调用,可做网站地图
2014-03-18 10:00:06 来源: 浏览: 次
导读: {pc:get sql="SELECT * FROM v9_category WHERE ismenu=1 and siteid=3 and parentid=0 ORDER BY listorder ASC"}
{pc:get sql="SELECT * FROM v9_category WHERE ismenu=1 and siteid=3 and parentid=0 ORDER BY listorder ASC"}
{loop $data $c}
<li>
<a href="{$c[url]}">{$c['catname']}</a>
{if $c['child']==1}
<ul>
{php $num=1}
{loop subcat($c['catid']) $c2}
<li><a href="{$c2[url]}">{$c2['catname']}</a></li>
{if $num==3}<li class="divider"></li>{/if}
{php $num++}
{/loop}
</ul>
{/if}
</li>
{/loop}
{/pc}