PbootCMS搜索未搜索到任何數據,Pb多條件搜索
1、數據庫中有內容而頁面提示 未搜索到任何數據
解決方案:
在前半部分添加一個標簽 scode=*
代表搜索所有欄目內容
1{pboot:search num=12 order=sorting scode=* field=title|content}
2{/pboot:search}
簡單搜索代碼示例
1<form action="{pboot:scaction}" method="get">
2關鍵字:<input type="text" name="keyword" >
3<button type="submit">搜索</button>
4</form>
多條件搜索代碼示例
可以通過隱藏字段,指定搜索的欄目
1<form action="{pboot:scaction}" method="get">
2內容:<input type="text" name="content" >
3標題:<input type="text" name="title" >
4作者:<input type="text" name="author" >
5<input type="hidden" name="scode" value="2,3" >
6<button type="submit">搜索</button>
7</form>
搜索結果列表
1{pboot:search}
2<a href="search:link">search:title</a>
3{/pboot:search}
本文鏈接:http://m.www9463.cn/xinwendongtai/1946.html
版權聲明:站內所有文章皆來自網絡轉載,只供模板演示使用,并無任何其它意義!