DeDeCms模板中心官方客服QQ:356523100;24小时服务热线:4006-819-004(免长途)dedecms模板中心付费网站模板、功能模块仿制设计流程:
当前位置: 首 页 > 资讯类 > 经验分享 >

Dedecmsv5.7联动类型两级变一级的解决方法

admin / 2011-06-18

   DEDEcms联动类别一般都是两级联动,怎么把这个两级的修改成一级的呢?我跟大家分享下现实方法:

1.首先要修改infolink.lib.php
注释掉一下代码:

/*
        $sontype = ( ($househx % 500 != 0) ? $househx : 0 );
        $toptype = ( ($househx % 500 == 0) ? $househx : ( $househx-($membertype%500) ) );
        $fields['househx'] = "<a href='{$baseurl}plus/list.php?channelid={$channelid}&tid={$typeid}&househx={$toptype}&nativeplace={$nativeplace}'><b>{$em_househxs[$toptype]}</b></a> ";

       下级显示不显示
        foreach($em_househxs as $eid=>$em)
        {
            if($eid < $toptype+1 || $eid > $toptype+499) continue;
            if($eid == $househx) {
                $fields['househx'] .= " <b>{$em}</b>";
            }
            else {
                $fields['househx'] .= " <a href='{$baseurl}plus/list.php?channelid={$channelid}&tid={$typeid}&househx={$eid}&nativeplace={$nativeplace}'>{$em}</a>";
          }
        }
        */
 

换成

foreach($em_househxs as $eid=>$em)
        {
            if($eid % 500 != 0) continue;
            if(isset($_GET['househx']))
            {
                $navclass=$_GET['househx'];
                if ($navclass==$eid)
                {
                    $navclass=' style=color:#ff0000';
                }
                $fields['househx'] .= " <a href='{$baseurl}plus/list.php?channelid={$channelid}&tid={$typeid}&househx={$eid}&nativeplace={$nativeplace}'".$navclass.">{$em}</a>";
            }    
        }

即可!



 

转载请注明:DEDECMS模板(全国最专业的DEDECMS模板制作商)

行业动态 | 支付方式 | 购买流程 | 联系我们 | 网站地图一| 网站地图二
Copyright © 2010-2012 2DEDECMS.Com DEDECMS模板中心 版权所有  
Powered by DedeCMSV56_GBK © 2004-2011 DesDev Inc.
网站地图 TAG标签 RSS Google地图 百度地图

24小时服务热线

4006-819-004


在线客服