織夢dedecms手機(jī)搜索跳轉(zhuǎn)到手機(jī)搜索模板教程
1、首先打開php文件plus/search.php,代碼全部復(fù)制,然后新建一個文件名為search_m.php的文件,把search.php里面的代碼全部粘貼進(jìn)去,search_m.php還是放在plus目錄里面。
2、然后打開php文件include/arc.searchview.class.php復(fù)制全部代碼,新建一個文件include/arc.searchview.classm.php代碼粘貼進(jìn)去。
3、修改一下php文件了,打開search_m.php文件,里面第13行
require_once(DEDEINC."/arc.searchview.class.php");
修改為
require_once(DEDEINC."/arc.searchview.classm.php");
4、然后打開include/arc.searchview.classm.php文件,找到第131行
$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_m.htm";
這里 search_m.php 和 arc.searchview.classm.php 文件名字可以自己隨意更改。
修改好了以后別忘了在模板文件夾中添加search_m.htm手機(jī)搜索模板文件,織夢自帶了手機(jī)模板文件,只要簡單的修改就可以使用了。
手機(jī)搜索效果圖
(此圖片來源于網(wǎng)絡(luò),如有侵權(quán),請聯(lián)系刪除! )