先看效果图
不取消的时候选了城市后
我们修改后的效果!
修改方法
找到include/taglib/infolink.lib.php
然后找到
算了,还是直接贴链接吧!我也没删,只是注释掉了旧的!
if(empty($nativeplace)) { foreach($em_nativeplaces as $eid=>$em) { if($eid % 500 != 0) continue; $fields['nativeplace'] .= " <a href='{$baseurl}plus/list.php?channelid={$channelid}&tid={$typeid}&nativeplace={$eid}&infotype={$infotype}'>{$em}</a>\r\n"; } } else { $sontype = ( ($nativeplace % 500 != 0) ? $nativeplace : 0 ); $toptype = ( ($nativeplace % 500 == 0) ? $nativeplace : ( $nativeplace-($nativeplace%500) ) ); //2011-6-21 修改地区列表的一个小空格 论坛http://bbs.dedecms.com/371492.html(by:织梦的鱼) //取消默认的第一个 // $fields['nativeplace'] = "<a href='{$baseurl}plus/list.php?channelid={$channelid}&tid={$typeid}&nativeplace={$toptype}&infotype={$infotype}'> <b>{$em_nativeplaces[$toptype]}</b></a> >> "; foreach($em_nativeplaces as $eid=>$em) { if($eid % 500 != 0) continue; if($eid == $nativeplace) { $fields['nativeplace'] .= " <b>{$em}</b>\r\n"; }else{ $fields['nativeplace'] .= " <a href='{$baseurl}plus/list.php?channelid={$channelid}&tid={$typeid}&nativeplace={$eid}&infotype={$infotype}'>{$em}</a>\r\n";} } /*取消子集 foreach($em_nativeplaces as $eid=>$em) { if($eid < $toptype+1 || $eid > $toptype+499) continue; if($eid == $nativeplace) { $fields['nativeplace'] .= " <b>{$em}</b>\r\n"; } else { $fields['nativeplace'] .= " <a href='{$baseurl}plus/list.php?channelid={$channelid}&tid={$typeid}&nativeplace={$eid}&infotype={$infotype}'>{$em}</a>\r\n"; } } */ } //小分类链接 if(empty($infotype) || is_array($smalltypes)) { foreach($em_infotypes as $eid=>$em) { if(!is_array($smalltypes) && $eid % 500 != 0) continue; if(is_array($smalltypes) && !in_array($eid, $smalltypes)) continue; if($eid == $infotype) { $fields['infotype'] .= " <b>{$em}</b>\r\n"; } else { $fields['infotype'] .= " <a href='{$baseurl}plus/list.php?channelid={$channelid}&tid={$typeid}&infotype={$eid}&nativeplace={$nativeplace}'>{$em}</a>\r\n"; } } } else { $sontype = ( ($infotype % 500 != 0) ? $infotype : 0 ); $toptype = ( ($infotype % 500 == 0) ? $infotype : ( $infotype-($infotype%500) ) ); //取消默认的第一个 //$fields['infotype'] .= "<a href='{$baseurl}plus/list.php?channelid={$channelid}&tid={$typeid}&infotype={$toptype}&nativeplace={$nativeplace}'><b>{$em_infotypes[$toptype]}</b></a> >> "; foreach($em_infotypes as $eid=>$em) { if(!is_array($smalltypes) && $eid % 500 != 0) continue; if(is_array($smalltypes) && !in_array($eid, $smalltypes)) continue; if($eid == $infotype) { $fields['infotype'] .= " <b>{$em}</b>\r\n"; } else { $fields['infotype'] .= " <a href='{$baseurl}plus/list.php?channelid={$channelid}&tid={$typeid}&infotype={$eid}&nativeplace={$nativeplace}'>{$em}</a>\r\n"; } } /* 取消子链接 foreach($em_infotypes as $eid=>$em) { if($eid < $toptype+1 || $eid > $toptype+499) continue; if($eid == $infotype) { $fields['infotype'] .= " <b>{$em}</b>\r\n"; } else { $fields['infotype'] .= " <a href='{$baseurl}plus/list.php?channelid={$channelid}&tid={$typeid}&infotype={$eid}&nativeplace={$nativeplace}'>{$em}</a>\r\n"; } }*/ }
再贴个调用方法
{dede:infolink} //城市 不限 [field:linkallplace/] //列表 [field:nativeplace /] //类型 [field:linkalltype/] [field:infotype /] {/dede:infolink}