织梦CMS 如何判断栏目子栏目是否存在

分类:常见问题教程 发布时间:2019-05-24 23:09:48

摘要:织梦CMS 如何&怎么判断栏目子栏目是否存在?dede 判断栏目子栏目是否存在教程&方法,适用于织梦5.7

打开:include\taglib\channel.lib.php文件可以看到:

  1. $type=='son' && $reid!=0 && $totalRow==0

把 

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

改成

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

在织梦的channel标签中加上 noself='yes'就可以了!

  1. {dede:channel type='son'row='5'noself='yes'}