织梦让channelartlist标签支持currentstyle高亮属性方法

织梦让channelartlist标签支持currentstyle高亮属性方法,第1张

概述要实现织梦让channelartlist标签支持currentstyle高亮属性方法 首先打开include\taglib\channelartlist.lib.php 找到 $pv-Fields[typeurl] = GetOneTypeUrlA($typeids[$i]); 在此行代码下方增加以下代码: if($typeids[$i][id] == $refObj-TypeLink-TypeInfo

要实现织梦让channelartList标签支持currentstyle高亮属性方法

首先打开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['topID'] ){ 

             $pv->FIElds['currentstyle'] = $currentstyle ? $currentstyle : 'current'; 

         } 

         else{ 

             $pv->FIElds['currentstyle'] = ''; 

         }

添加这个后才能对二级栏目也起作用

 

调用方法:

{dede:channelartList typeID='4' currentstyle='current'} 

 

 {/dede:channelartList} 


总结

以上是内存溢出为你收集整理的织梦让channelartlist标签支持currentstyle高亮属性方法全部内容,希望文章能够帮你解决织梦让channelartlist标签支持currentstyle高亮属性方法所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/zz/1056145.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-25
下一篇 2022-05-25

发表评论

登录后才能评论

评论列表(0条)

保存