名站网址导航为大驾家提供DedeCMS站点程序站点教程相关的知识,比如织梦程序安装教程,织梦程序系统故障等教程。
DedeCms分类信息联动筛选,省级与地市分开联动,注意:只适用于5.6版,其它版本没有测试,只应用于分类信息模型。其它联动可参照修改。
可能文章标题说的不是很清楚,下面以图为示例:
如上图所示,默认是显示北京的区县,当点击上海市时,地市处显示上海的县区。这下大驾家伙明白了吧!
现在开始相关具体代码如下修改操作,只需要修改一个网站文件。
Copy to Clipboard 引用的网站内容:[www.mzdh.net] //地区链接 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-($nativeplaceP0) ) ); $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 < $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"; } } } |
把上面注释掉,然后在下面添加如下相关具体代码如下:
Copy to ClipboardLiehuo.Net Codes引用的网站内容:[www.mzdh.net] 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}'>{$em}</a>\r\n"; } //地区链接 if(empty($nativeplace)) { foreach($em_nativeplaces as $eid=>$em) { if($eid > 999 ) continue; $fields['diqu'] .= " <a href='{$baseurl}plus/list.php?channelid={$channelid}&tid={$typeid}&nativeplace={$eid}'>{$em}</a>\r\n"; } } else { $sontype = ( ($nativeplace % 500 != 0) ? $nativeplace : 0 ); $toptype = ( ($nativeplace % 500 == 0) ? $nativeplace : ( $nativeplace-($nativeplaceP0) ) ); foreach($em_nativeplaces as $eid=>$em) { if($eid < $toptype 1 || $eid > $toptype 499) continue; if($eid == $nativeplace) { $fields['diqu'] .= " <b><a href='{$baseurl}plus/list.php?channelid={$channelid}&tid={$typeid}&nativeplace={$nativeplace}'>{$em}</a></b>\r\n"; } else { $fields['diqu'] .= " <a href='{$baseurl}plus/list.php?channelid={$channelid}&tid={$typeid}&nativeplace={$eid}'>{$em}</a>\r\n"; } } } |
保存就可以了。谢谢阅读烈火网提供的DedeCMS站点程序教程。
关于DedeCMS站点程序站点教程相关的知识,就说到这里了希望能帮助朋友们。DedeCMS站点程序修改水印坐标调整水印位置教程