找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
查看: 86|回复: 0

[cms教程] 织梦channelartlist高亮并且让嵌套标签里的channel也支持currentstyle高亮

[复制链接]

该用户从未签到

发表于 2020-7-16 09:43:07 | 显示全部楼层 |阅读模式

您需要 登录 才可以下载或查看,没有账号?立即注册

×
摘要:dede:channelartlist嵌套dede:channel,如果想要channel也能使用currentstyle,那需要修改2步就能轻松实现二级高亮。
        dede:channelartlist栏目高亮实现教程
        打开 /include/taglib/channelartlist.lib.php 找到
        $pv->Fields['typeurl', = GetOneTypeUrlA($typeids[$i,);
        在它下面加入
        if($typeids[$i,['id', == $refObj->TypeLink->TypeInfos['id', || $typeids[$i,['id', == $refObj->TypeLink->TypeInfos['reid', || $typeids[$i,['id', == $refObj->TypeLink->TypeInfos['topid', || $typeids[$i,['id', == GetTopid($refObj->TypeLink->TypeInfos['id',) ) { $pv->Fields['currentstyle', = $currentstyle ? $currentstyle : 'current'; } else { $pv->Fields['currentstyle', = ''; }
        然后 dede:channelartlist 标签里是高亮标签调用是
        {dede:field.currentstyle/}
        例如下面的写法
        嵌套标签
          {dede:channelartlist row=7 typeid=top currentstyle=current}  [url=,{dede:field.typename/}[/url] {dede:channel type='son' noself='yes' row='10' currentstyle="[url=~typelink~,~typename~[/url]"} [*,[url=,[field:typename/,[/url] {/dede:channel}   {/dede:channelartlist}
        channelartlist嵌套channel标签也高亮实现教程
        打开 /include/taglib/channel.lib.php 找到
        global $dsql;
        改成
        global $dsql,$_sys_globals;
        继续找到
        $row['id',==$typeid
        改成
        $row['id',==$typeid || $row['id',==$_sys_globals['typeid',
回复

使用道具 举报

网站地图|页面地图|文字地图|Archiver|手机版|小黑屋|找资源 |网站地图

GMT+8, 2024-5-25 22:45

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表