dedecms 调用所属栏目的二级栏目列表
include\taglib\channel.lib.php
在
else if($type=='self') { if($reid==0) return ''; $sql = "SELECT id,typename,typedir,isdefault,ispart,defaultname,namerule2,moresite,siteurl,sitepath FROM `#@__arctype` WHERE reid='$reid' And ishidden<>1 order by sortrank asc limit 0, $line "; }
下面添加
else if($type=='reid') { if($reid==0) return ''; $sql = "SELECT id,typename,typedir,isdefault,ispart,defaultname,namerule2,moresite,siteurl,sitepath FROM `#@__arctype` WHERE reid='$topid' And ishidden<>1 order by sortrank asc limit 0, $line "; }
把
if( ($row['id']==$typeid || ($topid==$row['id'] && $type=='top')) && $currentstyle!='' )
改为
if( ($row['id']==$typeid || ($topid==$row['id'] && $type=='top') || ($row['id']==$reid && $type=='reid' ) ) && $currentstyle!='' )
模板中调用标签:
{dede:channel type='reid' currentstyle=' <a href="~typelink~" class="on">~typename~</a> '} <a href="[field:typeurl/]">[field:typename/]</a>{/dede:channel}