帝国cms,调用子栏目和对应链接
本文发布于:2014-10-15
列表页调用子栏目和对应链接
<?php
$bclassid=$GLOBALS[navclassid]
?>
[e:loop={"select classid, classname, classpath from `[!db.pre!]enewsclass` where bclassid='$bclassid' order by `classid` desc ",5,24,0,0,0}]
<li><a href="<?=$bqsr[classurl]?>" class="sub_current">
<?=$class_r[$bqr[classid]]['classname']?>
</a></li>
[/e:loop]
灵感来自这里:http://bbs.phome.net/showthread-13-89880-0.html
下面这个是调用父级栏目的子栏目
[e:loop={"select classid,classname,classpath from [!db.pre!]enewsclass where bclassid = '".$class_r[$GLOBALS[navclassid]][bclassid]."' order by classid",0,24,0}] <li><a href="<?=$bqsr[classurl]?>" class="sub_current">
<?=$bqsr[classname]?></a></li> [/e:loop]