织梦在搜索结果页添加按栏目按模型细分数据
搜索结果页显示效果
织梦在搜索结果页添加按栏目按模型细分数据,不修改程序文件,直接在模板文件里实现
search.htm 搜索结果页按栏目细分标签写法
1 2 3 |
<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
search.htm 搜索结果页按内容模型细分标签写法
1 2 3 |
<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> |
注意上面 channeltype 就是按模型id
①本站所有织梦模板资源均来自用户分享和网络收集,如果侵犯了您的权益,请联系网站客服处理
②本站提供的织梦源码,均带数据及演示地址。可以在任一源码详情页查看演示地址。
③由于博主时间紧缺,所有模板源码不提供技术支持。仅部分收费原创源码提供售后
④如遇模板源码下载链接打不开或者有错误,请联系网站客服QQ指出纠正。
⑤人民币与金币汇率为1比1,即1元=1金币
织梦楼 » 织梦在搜索结果页添加按栏目按模型细分数据
织梦楼 » 织梦在搜索结果页添加按栏目按模型细分数据