muban大师 发表于 2021-3-20 10:27:20

织梦导航标签channel里的typeid无效解决方法

织梦默认的currentstyle是不支持typeid属性的,调用方法:
       
       
               
                       
                               
                                       
{dede:channel type='son' row='8' currentstyle="[*, "}
[*,,
{/dede:channel}
                               
                       
               
       

       
        但是很多情况下需要单独指定栏目(比如:产品下拉菜单),这时用channel里的typeid就没有效果了,需要去修改include/taglib/channel.lib.php
       
        查找:
       
       
               
                       
                               
                                       
if( ($row['id',==$typeid || ($topid==$row['id', && $type=='top') ) && $currentstyle!='' )
                               
                       
               
       

       
        替换:
       
       
               
                       
                               
                                       
if( ( $row['id',== $refObj->TypeLink->TypeInfos['id', || ($topid==$row['id', && $type=='top') ) && $currentstyle!='' )
                               
                       
               
       

       
        调用方法:
       
       
               
                       
                               
                                       
{dede:channel typeid ='2'type ='son' currentstyle="[*, "}
[*,,
{/dede:channel}
页: [1]
查看完整版本: 织梦导航标签channel里的typeid无效解决方法