dede无子栏目的栏目直接调用*栏目(不让调用的解决方法) noself=\'yes\'

大家在用dede做网站的时候经常会出现一个问题就是当调用子栏目的时候会出现无子栏目的栏目直接调用*栏目,
 
解决dede无子栏目时出现同级栏目的问题
 
{dede:channel type='son'}无子栏目时不取同级栏目解决方法 
 
Tags: {dede:channel  type='son'}无子栏目
 
{dede:channel type='son'}无子栏目时取同级栏目问题如何解决呢?
 
打开:include\taglib\channel.lib.php文件。
 
找到
view plainprint?
if($type=='son' && $reid!=0 && $totalRow==0)  
改成  
 
if($type=='son' && $reid!=0 && $totalRow==0 && $noself=='')  
 
 
然后调用中标签写法:
view plainprint?
{dede:channel type='son' noself=='yes'}  
   <a href="[field:typelink/]" title="">[field:typename/]</a>  
   {/dede:channel}  
 
 
原文链接:http://blog.csdn.net/forest_fire/article/details/50943676
上一篇:PerformSelector may cause a leak because its selector is unknown 解决方法


下一篇:编写SqlHelper使用,在将ExecuteReader方法封装进而读取数据库中的数据时会产生Additional information: 阅读器关闭时尝试调用 Read 无效问题,解决方法与解释