织梦园模板网专注于织梦企业模板、DeDe整站模板、织梦Html5模板等织梦模板的下载,提供DEDE织梦模板相关服务。织梦园织梦模板交流群
用户名:
密码:
注册
注册后享受折扣价

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

织梦园模板 / 2015-12-28 / 收藏

***步:打开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}  

相关织梦技巧

收缩