织梦dedecms系统中英文网站之中英文搜索结果
DEDECMS在制作中英文站时,需要在中文站上只搜索出中文站的内容,而在英文站只会搜索出英文站中的内容,此时就需要给英文站搜索栏目单独做个模板出来,可以按以下方法来实现.
复制plu
更多精彩就在: 51免费论文网|www.jxszl.com
s目录下的serach.php文件把复制后的更名为searche.php做为新的搜索文件.
编辑searche.php,找到此行代码require_once(DEDEINC."/arc.searchview.class.php");替换为require_once(DEDEINC."/arc.searchviewen.class.php");
复制include目录下的arc.searchview.class.php文件并更名为arc.searchviewen.class.php
编辑arc.searchviewen.class.php,找到这行代码
复制代码
$tempfile=$GLOBALS[cfg_basedir].$GLOBALS[cfg_templets_dir]."/".$GLOBALS[cfg_df_style]."/search.htm";
改为
复制代码
$tempfile=$GLOBALS[cfg_basedir].$GLOBALS[cfg_templets_dir]."/".$GLOBALS[cfg_df_style]."/search_en.htm";
复制模板中的search.htm,并更名为search_en.php
此时英文站的模板都已做好,
找到英文站的相关搜索代码,如下以示例
复制代码
用searche.php去搜索,name="typeid"value="IIVI"这个是指定栏目ID.
原文链接:http://www.jxszl.com/biancheng/dedecms/75525.html
热门阅读