网站建设

帝国cms不同栏目调用不同的搜索模板

蜗牛 · 4月13日 · 2020年

如果您因为动态标签调用修改过/e/search/result/index.php ,请点击这里解决

很简单,在搜索的form表单里面加上两行代码就可以了

<input type="hidden" name="tbname" value="news">
<input type="hidden" name="tempid" value="1">

请将 value 的值修改为相对应的值;第一行的value值为数据表的名称,第二行的value值为搜索模板的id;

例如:

<form action="[!--news.url--]e/search/index.php" method="post">	
	<button type="submit"></button>
	<input name="keyboard" type="text" placeholder="Search Products" />
	<input name="show" type="hidden" value="title">
	<input type="hidden" name="tbname" value="product">
	<input type="hidden" name="tempid" value="1">
</form>

如果你因为搜索结果页面不支持动态标签,不如看看我的这篇文章:《帝国CMS搜索模板支持动态标签调用》

0 条回应