如果你的栏目只有2层目录,那么你最直接的方法就是直接写2个 {get sql xxx}
{get sql="SELECT * FROM phpcms_category where child = 0 ORDER BY catid DESC" return="b"} 获得全部父节点的栏目信息
然后你再
loop $b $n $r
{get sql="SELECT * FROM phpcms_category where catid in ($r[arrchildid]) ORDER BY catid DESC" return="b"} .
大概意思就是这样吧。
{get sql="SELECT * FROM `phpcms_category` WHERE `catid`=$m order by listorder" }