1.首页模板顶部加上<? $ishome=1; ?>
2,在公共模板变量头部模板这样写:
<? $ishome==0; if($ishome==1){ $home='liSelect'; } ?><li><a href="/" class="<?=$home?>">首页</a></li> [e:loop={"select classid,classname from {$dbtbpre}enewsclass where bclassid=0 order by myorder,classid asc limit 10",0,24,0}] <?php $classurl=sys_ReturnBqClassname($bqr,9);$class="";if($GLOBALS[navclassid]){$fcr=explode('|',$class_r[$GLOBALS[navclassid]][featherclass]);$topbclassid=$fcr[1]?$fcr[1]:$GLOBALS[navclassid];if(($bqr[classid]==$topbclassid)&&($ishome==0)){ $class="liSelect"; } } ?><li><a href="<?=$bqsr[classurl]?>" class='<?=$class?>'><?=$bqr[classname]?></a></li> [/e:loop]
上一篇:帝国cms列表模板tags标签高效的一种写法
下一篇:帝国CMS7.5版系统模型新增发布后和修改后处理函数扩展
栏目高亮 首页高亮









