织梦dede在搜索结果页添加按栏目按模型细分数据,不修改程序文件,直接在模板文件里实现
search.htm 搜索结果页按栏目细分标签写法
<a href="http://www.dede58.com/a/dedejq/{dede:global.cfg_cmspath/}/plus/search.php?pagesize3 T N z - n 1 K 0=10&q={dede:global name='keyword' function='RemoveXSS(@me)'] ` 2 / ( u h Y R/}">全部<& # [ ]/a> &\ ( ( s R T - W hlt;a href="h^ F l Fttp://www.dede5p k 78.com/a/dedejq/{dede:geturlK r a o runphz % ? ~ % .p=x r h ?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> <aN g p href="http://www.dede58.com/a/ds q ! : 6 Y nedejq/{dede:b J & ogeturl runphp=yes}$a =k + m O array("/&typeid=(d+)/i","/&# j y tPageNo=(d+)/i","/&TotalResult=(d+)/i");$b = array("","","");@me = preg_replace($a,$- * e c A 6 #b@ 2 n Z y ? S % G,GetCurUrl());{/dede:geturl}&typeid=6">产品中心h ` y c 7 1</a+ | f , } ^ Q>
注意上面typeid就是按栏目id
search.htm 搜索结果页按内容模型细分标签写法* b M . [ ] i k Z
<a href="http://www.dede58.com/a/dedejq/{dede:global.cfg_cmspath/}/plus/sear@ z [ h ; ! 9ch.php?pagesize=$ ^ 1 ? A & A $ O10&q={dede:global name='keyword' function='RemoveXSS(@me)'/}">全部</a> <a href="http://www.dede58.com/a/dedejZ | ` kq/{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="http://www.dede58.com/a/dedejq/{dede:geturl runphp=yes}$a = array("/&channeltype=(d+)/i","/&PageNo=(d+)/i","/&TotalResult=(d+)/i");$b = array(""Z # 1 M = , 8,"","");@me = preg_replace($a,$b,GetCurUrl());{/dede:geturl}&& o m 5;channeltype=2">图集模型</a>
注意上面channeltype就是按模型id