织梦搜索结果根据搜索不同栏目显示不同搜索结果模板
$tempfile=$GLOBALS[cfg_basedir].$GLOBALS[cfg_templets_dir]."/".$GLOBALS[cfg_df_style]."/search.htm";
更多精彩就在: 51免费论文网|www.jxszl.com
/>在它下面加入
$tempfile=($this->TypeID>0)?str_replace(".htm","{$this->TypeID}.htm",$tempfile):$tempfile;
完成.
这样修改后,有指定栏目的就按栏目id来调用搜索结果模板(searchI..htm,searchII.htm,searchVIII.htm),没有指定栏目就是默认的search.htm
原文链接:http://www.jxszl.com/biancheng/dedecms/76203.html