织梦Dedecms联动方式二级变一级的方法_DedeCms教程

编辑Tag赚U币
教程Tag:暂无Tag,欢迎添加,赚取U币!
织梦Dedecms联动方式二级变一级的方法,现在就来说一下如何修改文件,找到infolink.lib.php。
以下代码都注掉
  1. /*  
  2. $sontype = ( ($househx % 500 != 0) ? $househx : 0 );  
  3. $toptype = ( ($househx % 500 == 0) ? $househx : ( $househx-($membertype%500) ) );  
  4. $fields['househx'] = "<a href=’{$baseurl}plus/list.php?channelid={$channelid}&tid={$typeid}&househx={$toptype}&nativeplace={$nativeplace}’><b>{$em_househxs[$toptype]}</b></a> ";  
下级显示不显示
  1. foreach($em_househxs as $eid=>$em) 
  2. { 
  3. if($eid < $toptype+1 || $eid > $toptype+499) continue; 
  4. if($eid == $househx) { 
  5. $fields['househx'] .= " <b>{$em}</b>"; 
  6. } 
  7. else { 
  8. $fields['househx'] .= " <a href=’{$baseurl}plus/list.php?channelid={$channelid}&tid={$typeid}&househx={$eid}&nativeplace={$nativeplace}’>{$em}</a>"; 
  9. } 
  10. } 
  11. */ 
换成
  1. foreach($em_househxs as $eid=>$em) 
  2. { 
  3. if($eid % 500 != 0) continue; 
  4. if(isset($_GET['househx'])) 
  5. { 
  6. $navclass=$_GET['househx']; 
  7. if ($navclass==$eid) 
  8. { 
  9. $navclass=’ style=color:#ff0000′; 
  10. } 
  11. $fields['househx'] .= " <a href=’{$baseurl}plus/list.php?channelid={$channelid}&tid={$typeid}&househx={$eid}&nativeplace={$nativeplace}’".$navclass.">{$em}</a>"; 
  12. } 
  13. } 
仅供大家学习参考,希望对大家有帮助

查看更多 DedeCms教程  织梦模板  织梦DedeCms视频教程  织梦dedecms专题

来源:模板无忧//所属分类:DedeCms教程/更新时间:2020-04-30
相关DedeCms教程: