帝国cms内容页调用当前分类名/栏目名及同级栏目带hover高亮样式判断
<?php $fcr=explode('|',$class_r[$GLOBALS[n...
<?php
$fcr=explode('|',$class_r[$GLOBALS[navclassid]][featherclass]);
$class=$fcr[1]?$fcr[1]:$GLOBALS[navclassid]; //取得父栏目id
$classurl=sys_ReturnBqClassname($r,9);
?>
[e:loop={"select * from {$dbtbpre}enewsclass where bclassid='$class' ",0,24,0}]
<p <?=($GLOBALS[navclassid]==$bqr[classid])?' class="active"':''?>><a href="<?=$bqsr[classurl]?>"><?=$bqr[classname]?></a></p>
[/e:loop]
案例图:
$fcr=explode('|',$class_r[$GLOBALS[navclassid]][featherclass]);
$class=$fcr[1]?$fcr[1]:$GLOBALS[navclassid]; //取得父栏目id
$classurl=sys_ReturnBqClassname($r,9);
?>
[e:loop={"select * from {$dbtbpre}enewsclass where bclassid='$class' ",0,24,0}]
<p <?=($GLOBALS[navclassid]==$bqr[classid])?' class="active"':''?>><a href="<?=$bqsr[classurl]?>"><?=$bqr[classname]?></a></p>
[/e:loop]
案例图: