[e:loop={"select classname,classpath,classid from phome_enewsclass where bclassid='".$class_r[$GLOBALS[navclassid]][bclassid]."' and showclass=0 order by classid ",0,24,0}]
<?php
$class="";
if($bqr[classid]==$GLOBALS[navclassid])
{
$class='hover';
}
?>
<a href="<?=$bqsr[classurl]?>" class="<?=$class?>"><?=$bqr[classname]?></a>
[/e:loop]
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='menuon'";
}
else {
}
}
灵动标签调用代码如下:
<ul>
<li><a href="[!--news.url--]">首页</a></li>
[e:loop={'select classid,classname,classpath from [!db.pre!]enewsclass where bclassid=0 and showclass=0 order by myorder',0,24,0}]
<li id="cid<?=$bqr[classid]?>" <?=currentPage($GLOBALS[navclassid],$bqr[classid])?>>
<a href="<?=$public_r[newsurl]?><?=$bqr[classpath]?>" title="<?=$bqr[classname]?>" target="_self" ><?=$bqr[classname]?></a>
</li>
[/e:loop]
</ul>