+ 收藏我們

網(wǎng)站模板

網(wǎng)站模板搜索

注冊
網(wǎng)站模板 > cms教程 > pbootcms教程 >

PbootCMS搜索未搜索到任何數(shù)據(jù),Pb多條件搜索

AB模板網(wǎng) / 2021-12-04

1、數(shù)據(jù)庫中有內(nèi)容而頁面提示 未搜索到任何數(shù)據(jù)

解決方案:

在前半部分添加一個標(biāo)簽 scode=* 

代表搜索所有欄目內(nèi)容
 

{pboot:search num=12 order=sorting scode=* field='title|content'}
{/pboot:search}

PbootCMS搜索未搜索到任何數(shù)據(jù),Pb多條件搜索

簡單搜索代碼示例

<form action="{pboot:scaction}" method="get">
    關(guān)鍵字:<input type="text" name="keyword" >
    <button type="submit">搜索</button>
</form>

多條件搜索代碼示例

可以通過隱藏字段,指定搜索的欄目

<form action="{pboot:scaction}"  method="get">
    內(nèi)容:<input type="text" name="content" >
    標(biāo)題:<input type="text" name="title" >
    作者:<input type="text" name="author" >
    <input type="hidden" name="scode" value="2,3" >
    <button type="submit">搜索</button>
</form>


搜索結(jié)果列表

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

文章搜集與網(wǎng)絡(luò),如有侵權(quán)請聯(lián)系本站,轉(zhuǎn)載請說明出處:http://www.warewashingadvisors.com/pbootcmsjs/9723.html
首頁 pbootcms模板 html模板 會員中心
 
咨詢
QQ在線咨詢

如無回復(fù)
請加下面的微信

添加微信客

微信客服
wwwadminbuycn