请问搜索页面如何定义第二个模板文件?
因为我做了中英文版本,现在中英文版本都是用同一个搜索代码,那在英文页面,搜索结果就会跳到中文页面
所以想问怎么修改下面这段代码,让我可以使用第search_en.html的这个模板文件? 默认会使用search.html
<form class="search" action="/index.php" method="get">
<input type="hidden" name="s" value="api">
<input type="hidden" name="c" value="api">
<input type="hidden" name="m" value="search">
<input type="hidden" name="dir" id="dr_search_module_dir" >
<div class="ipt-txt">
<button id="dr_search_module_name" type="button" data-toggle="dropdown" aria-expanded="false" style="display: none"> </button>
<!-- <ul class="dropdown-menu">
这是来列出全部可以搜索的内容模块
{php $top_search=[];}
{cache name=module-content}
{if $t.search}
{php !$top_search && $top_search=$t;}
<li><a href="javascript:dr_search_module_select('{$t.dirname}', '{$t.name}');"> {$t.name} </a></li>
{/if}
{/cache}
</ul>
-->
<input type="text" placeholder="请输入您要搜索的关键词" name="keyword" class="fc-search-keyword form-control">
</div>
<button type="submit" name="" class="btn-submit"> 搜 索 </button>
<script>
// 这段js是用来执行搜索的
function dr_search_module_select(dir, name) {
$("#dr_search_module_dir").val(dir);
$("#dr_search_module_name").html(name+' <i class="fa fa-angle-down"></i>');
}
dr_search_module_select('{php echo defined('MOD_DIR') ? MOD_DIR : $top_search.dirname}', '{php echo defined('MOD_DIR') ? MODULE_NAME : $top_search.name}');
</script>
</form>
如果实在不想买 多网站插件,,那就英文版单独创建栏目,栏目设置中设置不一样的模板。