在网上找了很多,但相对比较杂乱,相对整理了一下!
根据数据表搜索:
<form action="/e/search/index.php" method="post" name="searchform" id="searchform"> <input type="hidden" name="show" value="title,newstext"> <input type="hidden" name="tempid" value="1"> <input name="keyboard" type="text" id="keyboard"> <select name="tbname"> <option value="news">教程</option> <option value="downl">下载</option> </select> <input type="submit" name="submit" value="搜索"> </form>
Show:搜索字段变量(多个字段用","隔开。搜索字段必须是后台系统模型开启搜索项的字段)
Tempid:所用搜索模板ID(一般跟按表搜索结合使用)
Keyboard:搜索关键字变量
Tbname:按数据表搜索(需与搜索模板ID结合Tempid)
按表时,搜索自定义字段一定要注意搜索模板选择的所属系统模型是否对应。
根据栏目id搜索:
<form name="searchform" method="post" action="/e/search/index.php"> <input type="hidden" name="show" value="title,newstext"> <input name="keyboard" type="text" size="10"> <select name="classid"> <option value="0">全部</option> <option value="1">教程</option> <option value="2">下载</option> </select> <input type="submit" name="submit" value="搜索"> </form>
Show:搜索字段变量(多个字段用","隔开。搜索字段必须是后台系统模型开启搜索项的字段)
Keyboard:搜索关键字变量
Classid:搜索栏目ID(不设置为不限,多个栏目可用","隔开,设置父栏目会搜索所有子栏目
)
原文:http://www.dnwfb.com/page4_5_0.html