大家在用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