phpcms 列表页中,如何调用其下的所有子栏目?
{pc:content action="category" catid="$catid" num="99" order="listorder ASC"} {loop $data $cat} {pc:content action="lists" catid="$cat['catid']" order="id DESC" num="6" return="subcate"} {if $subcate} <h2><a href="{$cat['url']}">{$cat['catname']}</a></h2> <ul class="news_list"> {loop $subcate $r} <li><span>{date('Y/m/d H:i',$r['inputtime'])}</span><a{if $n==1} class="b"{/if} href="{$r['url']}">{$r['title']}</a></li> {/loop} </ul> {/if} {/pc} {/loop} {/pc}
或者
{pc:get sql="select * from phpcms_category where catid in(你的子栏目ID)" return="data"} {loop $data $r} <a href="{$r['url']}">{$r['catname']}</a> {/loop} {/pc} 如果你的子栏目ID是8,9,10的话,条件哪里就写成in(8,9,10)