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}

 

posted @ 2015-08-06 23:09  小技术博客  阅读(364)  评论(0编辑  收藏  举报
句子 谜语 起名