帝国CMS灵动标签获取制指定栏目的子栏目 并当前栏目高亮
代码如下:
1
2
3
4
5
6
7
8
9
10
11
|
[e:loop={ "select classid,classname,bname from {$dbtbpre}enewsclass where bclassid=7 order by myorder,classid asc" ,0,24,0}] <?php $classurl =sys_ReturnBqClassname( $bqr ,9); //取得栏目地址 $class2 = "" ; if ( $bqr [classid]== $GLOBALS [navclassid]) //当前栏目ID { $class2 = "current" ; } ?> <li class = "<?=$class2?>" ><a href= "<?=$classurl?>" ><?= $bqr [classname]?></a></li> [/e:loop] |
bclassid=7 //此处指定栏目ID