一、取得栏目ID并添加class
文件e/class/userfun.php添加下面段语句
function currentPage($classid,$thisid){
global $class_r;
$fr=explode(‘|’,$class_r[$classid][featherclass]);
$topbclassid=$fr[1]?$fr[1]:$classid;//取得第一级栏目id
if ($topbclassid==$thisid) {
echo “class=’自定'”;
}
else {
}
}
二、用灵动标签调用
[e:loop={‘select classid,classname,classpath from [!db.pre!]enewsclass where bclassid=0 and showclass=0 order by myorder’,0,24,0}]
<li<?=currentPage($GLOBALS[navclassid],$bqr[classid])?>><a href=”<?=$public_r[newsurl]?><?=$bqr[classpath]?>/” title=”<?=$bqr[classname]?>”><?=$bqr[classname]?></a></li>
[/e:loop]