muban大师 发表于 2021-6-5 19:06:06

dede织梦channelartlist高亮并且让嵌套标签里的channel

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标签
       
       
               
                       
                               
                                       
   
      {dede:channelartlist row=7 typeid=top currentstyle=current}
      
            
            
                {dede:channel type='son' noself='yes' row='10' currentstyle=""}
                [*,
                {/dede:channel}
            
      
      {/dede:channelartlist}
   
                               
                       
               
       

        织梦教程
        打开 /include/taglib/channel.lib.php 找到
       
        global $dsql;
        改成
       
        global $dsql,$_sys_globals;
        继续找到
       
        $row['id',==$typeid
        改成
       
        $row['id',==$typeid || $row['id',==$_sys_globals['typeid',
页: [1]
查看完整版本: dede织梦channelartlist高亮并且让嵌套标签里的channel