欢迎来到素材无忧网,按 + 收藏我们
登录 注册 退出 找回密码

dede 让channelartlist标签支持currentstyle属性 完美解决

时间: 2017-04-03 23:47 阅读: 作者:素材无忧网

打开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='2' currentstyle='current'}  
 <li class='{dede:field.currentstyle/}'><a href='{dede:field name='typeurl'/}'>{dede:field name='typename'/}</a></li>  
 。。。  
 {/dede:channelartlist}  

版权声明: 本站资源均来自互联网或会员发布,如果侵犯了您的权益请与我们联系,我们将在24小时内删除!谢谢!

转载请注明: dede 让channelartlist标签支持currentstyle属性 完美解决

标签: dede  
相关文章
模板推荐