PbootCMS多条件搜索教程,用于查询

bootCMS想要实现多条件搜索要怎么操作呢?

简单搜索代码示例:

(只通过关键词进行搜索) <form action="{pboot:scaction}" method="get"> 关键字:<input type="text" name="keyword" > <button type="submit">搜索</button> </form>  

多条件搜索代码示例:

可以通过隐藏字段,指定搜索的栏目
查看源码
<form action="{pboot:scaction}"  method="get">
    内容:<input type="text" name="content" >
    标题:<input type="text" name="title" >
    作者:<input type="text" name="author" >
    <input type="hidden" name="scode" value="2,3" >
    <button type="submit">搜索</button>
</form>
 

通用搜索结果列表:

{pboot:search} <a href="search:link">search:title</a> {/pboot:search}  

pbootcms实现全词匹配精确搜索或查询,可用于证书查询,授权查询一类的功能。

搜索页面模板标签如下:
查看源码
{pboot:search field='title' fuzzy=0 scode=5}
<a href="[search:link]">[search:title]</a>
{/pboot:search}
field='title'代表匹配标题 fuzzy=0代表精确匹配 scode=5代表只匹配栏目id为5的栏目文章