首页 > 教程 >
织梦channel子栏目导航标签currentstyle鼠标点击高亮变色加class样式
2023-04-03教程围观次
简介文章介绍.red2{color:red;}如果点击了其他页面不加class='red2',当点击或者首次打开首页的时候会加classMarkup首页如果点击了其中的一个栏目则则这个栏目增加class='red2'变色Markup{dede:channeltype='top'row='8'currentstyle="~typename~"}[field:typename/]{/dede:channe
文章介绍
<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_ host/}'>首页</a></li> |
如果点击了其中的一个栏目则则这个栏目增加class='red2'变色
Markup
{dede:channel type='top' row='8' currentstyle="<li class='red2'><a href='~type ~' >~typename~</a> </li>" }<li><a href="[field:type /]">[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->Type ->TypeInfos['id'] || ($topid==$row['id'] && $type=='top') ) && $currentstyle!='' ) |
下面是子栏目currentstyle的调用
Markup
{dede:channel typeid='3' currentstyle="<li class='red2'><a href='~type ~' >~typename~</a> </li>" }<li><a href="[field:type /]">[field:typename/]</a></li>{/dede:channel} |
下载链接:网站源码/小程序源码/网站模板下载
下载排行
- 酱茄WordPress小程序开源版源码 v1.1.8
- 最新版云喵圈子全开源系统源码/兴趣社区交友圈子系统小程序源码
- wordpress主题_ripro美化子主题_虎造子主题集成后台美化包v2.0
- EyouCMS响应式苗木园林绿化公司模板/易优CMS农业林业类企业网站模板
- 【亲测可用】 仿熊猫办公图片素材站PPT模板简历模板下载站源码+WAP手机端+采集器+整站数据
- 全套打包微社区/西瓜同城分类信息系列打包整套插件(30个插件+小程序)
- 某鱼最近卖的很火蓝色版微信去水印小程序源码+接口
- 陪玩2.0升级版源码/价值18500元的最新商业版游戏陪玩语音聊天系统源码
- 掌上题库V1.2.2全开源版本小程序带后端
- 淘宝客APP源码/社交电商自营商城源码/前端基于Uniapp开发