东方星雨

简单网络

一个爱好网络的80后男站长。

关注我东方星雨个人微信号:476847113

您现在的位置是:首页 > 站长日志

帝国cms导航栏目出现当前栏目下的三级栏目并高亮显示

2018-07-06 站长 站长日志

一级栏目页

[showclasstemp]'selfinfo',1,0,0[/showclasstemp]

 

 

二级栏目页

[e:loop={'select bclassid,classid,classname,classpath from [!db.pre!]enewsclass where bclassid=5  and showclass=0 order by myorder',0,24,0}]
<dl><dt><a href="<?=$public_r[newsurl]?><?=$bqr[classpath]?>"  id="cid<?=$bqr[classid]?>"><?=$bqr[classname]?></a></dt>
<dd id="eid<?=$bqr[classid]?>">[showclasstemp]$bqr[classid],14,0,0[/showclasstemp]</dd>
</dl>
[/e:loop]
<script type="text/javascript">
var myid = document.getElementById('cid[!--self.classid--]');
myid.className = 'activeSub';
var eyid = document.getElementById('eid[!--self.classid--]');
eyid.className = 'dss';
var fyid = document.getElementById('fid[!--self.classid--]');
fyid.className = 'dss2';
</script>

 

 

三级栏目页

 

[e:loop={'select bclassid,classid,classname,classpath from [!db.pre!]enewsclass where bclassid=5  and showclass=0 order by myorder',0,24,0}]
<dl><dt><a href="<?=$public_r[newsurl]?><?=$bqr[classpath]?>"  id="cid<?=$bqr[classid]?>"><?=$bqr[classname]?></a></dt>
<dd id="eid<?=$bqr[classid]?>">[showclasstemp]$bqr[classid],14,0,0[/showclasstemp]</dd>
</dl>
[/e:loop]
<script type="text/javascript">
var myid = document.getElementById('cid[!--bclass.id--]');
myid.className = 'activeSub';
var eyid = document.getElementById('eid[!--bclass.id--]');
eyid.className = 'dss';
var fyid = document.getElementById('fid[!--self.classid--]');
fyid.className = 'dss2';
</script>

 

 

 

内容页

[e:loop={'select bclassid,classid,classname,classpath from [!db.pre!]enewsclass where bclassid=5  and showclass=0 order by myorder',0,24,0}]
<dl><dt><a href="<?=$public_r[newsurl]?><?=$bqr[classpath]?>"  id="cid<?=$bqr[classid]?>"><?=$bqr[classname]?></a></dt>
<dd id="eid<?=$bqr[classid]?>">[showclasstemp]$bqr[classid],14,0,0[/showclasstemp]</dd>
</dl>
[/e:loop]
<script type="text/javascript">
var myid = document.getElementById('cid[!--bclass.id--]');
myid.className = 'activeSub';
var eyid = document.getElementById('eid[!--bclass.id--]');
eyid.className = 'dss';
var fyid = document.getElementById('fid[!--classid--]');
fyid.className = 'dss2';
</script>

 

 


css代码样式

dd{ margin-left:30px; display:none}
.dss{  display:block}
.dss2{ color: #F00;}
.activeSub{ font-weight:bold}

 

 

标签模板

<h4> <a href="[!--classurl--]" id="fid[!--classid--]">[!--classname--]</a></h4>

 

帝国cms导航栏目出现当前栏目下的三级栏目并高亮显示

文章评论