muban大师 发表于 2020-9-25 11:17:56

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

文章介绍
       
        .red2{color:red;}
       
       
        如果点击了其他页面不加class='red2',当点击或者首次打开首页的时候会加class
       
       
       
        {dede:channel type='top' row='8' currentstyle=" " }
        [*,
        {/dede:channel}
       
        如果点击了其中的一个栏目则则这个栏目增加class='red2'变色
       
        {dede:channel type='top' row='8' currentstyle=" " }
        [*,
        {/dede:channel}
       
        注意:
       
        如果是子栏目currentstyle这个标签是不生效的。需要改个配置
       
        currentstyle无效的修复办法:
       
        修改include/taglib/channel.lib.php
       
        133行。
       
        if( ($row['id',==$typeid || ($topid==$row['id', && $type=='top') ) && $currentstyle!='' )
       
        修改为
       
        if( ($row['id',==$refObj->TypeLink->TypeInfos['id', || ($topid==$row['id', && $type=='top') ) && $currentstyle!='' )
       
        下面是子栏目currentstyle的调用
       
        {dede:channel typeid='3' currentstyle=" " }
        [*,
        {/dede:channel}
页: [1]
查看完整版本: 织梦channel子栏目导航标签currentstyle鼠标点击高亮变色加class样式