网站模板中心

您现在的位置:首页>>织梦大学>>织梦技巧

dede:channelartlist dede:channel 无子栏目时取同级栏目

来源: 编辑:admin 发布时间:2019-11-07热度:66 ℃
第一步:打开include/taglib/channel.lib.php文件,找到109行 if ( $type == son $reid !=0 $totalRow ==0) 修改为 if ( $type == son $reid !=0 $totalRow ==0 $noself == ) 第二步:在dede:channel中加入noself=yes或者noself=true...

第一步:打开include/taglib/channel.lib.php文件,找到109行

if($type=='son' && $reid!=0 && $totalRow==0)

修改为

if($type=='son' && $reid!=0 && $totalRow==0 && $noself=='')

 

第二步:在dede:channel中加入noself='yes'或者noself='true'

{dede:channel type='son' noself='true'}          
<dd><a href='[field:typelink/]'>[field:typename/]a>dd>          
{/dede:channel}  
Pbootcms问题解决

请点击在线联系我们【点击咨询解决问题】   如果您有任何Pbootcms问题,我们将免费为您写解决教程!

    PB模板网:承接仿站业务,价格200元起!