Copyright @ 2015-2024 织梦园 版权所有 Power by DedeCms
鲁ICP备15039853号-2

模板标签 TAG标签 网站地图 XML地图 今日更新 返回顶部
织梦dede在搜索结果页添加按栏目按模型细分数据,不修改程序文件,直接在模板文件里实现
<a href="{dede:global.cfg_cmspath/}/plus/search.php?pagesize=10&q={dede:global name='keyword' function='RemoveXSS(@me)'/}">全部</a> <a href="{dede:geturl runphp=yes}$a = array("/&typeid=(\d+)/i","/&PageNo=(\d+)/i","/&TotalResult=(\d+)/i");$b = array("","","");@me = preg_replace($a,$b,GetCurUrl());{/dede:geturl}&typeid=1">新闻中心</a> <a href="{dede:geturl runphp=yes}$a = array("/&typeid=(\d+)/i","/&PageNo=(\d+)/i","/&TotalResult=(\d+)/i");$b = array("","","");@me = preg_replace($a,$b,GetCurUrl());{/dede:geturl}&typeid=6">产品中心</a> |
注意上面 typeid 就是按栏目id
<a href="{dede:global.cfg_cmspath/}/plus/search.php?pagesize=10&q={dede:global name='keyword' function='RemoveXSS(@me)'/}">全部</a> <a href="{dede:geturl runphp=yes}$a = array("/&channeltype=(\d+)/i","/&PageNo=(\d+)/i","/&TotalResult=(\d+)/i");$b = array("","","");@me = preg_replace($a,$b,GetCurUrl());{/dede:geturl}&channeltype=1">文章模型</a> <a href="{dede:geturl runphp=yes}$a = array("/&channeltype=(\d+)/i","/&PageNo=(\d+)/i","/&TotalResult=(\d+)/i");$b = array("","","");@me = preg_replace($a,$b,GetCurUrl());{/dede:geturl}&channeltype=2">图集模型</a> |