• dedecms 调用所属栏目的二级栏目列表


    include aglibchannel.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}
  • 相关阅读:
    安装selenium
    虚拟机安装Linux系统
    Pycharm安装+python安装+环境配置
    shell命令
    单例模式
    装饰者模式
    AtomicInteger的CAS原理
    J.U.C总览图
    锁机制(四)
    锁机制(三)
  • 原文地址:https://www.cnblogs.com/jizl/p/4709454.html
Copyright © 2020-2023  润新知