欢迎来到润旭源码网
帮助中心

润旭源码网

热门搜索: 企业源码    免费源码   

织梦channel子栏目导航标签currentstyle鼠标点击高亮变色加

  • 时间:2020-07-18 10:43 编辑: 来源: 阅读:211
  • 扫一扫,手机访问
摘要:dedecms织梦channel子栏目导航标签currentstyle鼠标点击高亮变色加class样式 。<style>.red2{color:red;}</style>如果点击了其他页面不加class='red2',当点击或者首次打开首页的时候会加class Markup<li {dede:field name=typeid runphp="yes"}(@me

dedecms织梦channel子栏目导航标签currentstyle鼠标点击高亮变色加class样式 。

<style>

.red2{color:red;}

</style>

如果点击了其他页面不加class='red2',当点击或者首次打开首页的时候会加class

 

Markup

<li {dede:field name=typeid runphp="yes"}(@me=="")? @me=" class='red2'":@me="";{/dede:field}><a href='{dede:global.cfg_basehost/}'>首页</a></li>

如果点击了其中的一个栏目则则这个栏目增加class='red2'变色

 

Markup

{dede:channel type='top' row='8' currentstyle="<li class='red2'><a href='~typelink~' >~typename~</a> </li>" }

<li><a href="[field:typelink/]">[field:typename/]</a></li>

{/dede:channel}

注意:

 

如果是子栏目currentstyle这个标签是不生效的。需要改个配置

 

currentstyle无效的修复办法:

 

修改include/taglib/channel.lib.php 

 

133行。

 

PHP

if( ($row['id']==$typeid || ($topid==$row['id'] && $type=='top') ) && $currentstyle!='' )

修改为  

 

PHP

if( ($row['id']==$refObj->TypeLink->TypeInfos['id'] || ($topid==$row['id'] && $type=='top') ) && $currentstyle!='' )

下面是子栏目currentstyle的调用

 

Markup

{dede:channel typeid='3' currentstyle="<li class='red2'><a href='~typelink~' >~typename~</a> </li>" }

<li><a href="[field:typelink/]">[field:typename/]</a></li>

{/dede:channel}

 


  • 全部评论(0)
资讯详情页最新发布上方横幅
联系我们

QQ:888477 {点击直接联系}

邮箱:runxu123@qq.com

时间:周1——周6 【9:00-23:00

联系客服
购买源码 源码咨询 投诉建议 联系客服
0373-6621888
手机版

扫一扫进手机版
返回顶部