雲優CMS搜索調用教程

發(fā)布日期:2017-12-13 作者:雲優CMS 人氣:5506

首先,模闆目錄得存在搜索結果文件,即 search_index.html


其次,首頁或其他頁面(miàn)搜索框調用代碼示範如下

<form action="<yunu:url name='search'/>" method="post">
<input class="cont_text" type="text" name="key" value="" placeholder="請輸入關鍵字">
<input class="cont_btn" type="submit" name="" value="">
</form>


最後(hòu),搜索結果頁面(miàn)讀取數據

<yunu:list orderby="sort asc" keyword="$keyword">
<li>
<h5> <a href="{$list.url}" title="{$list.title}">{$list.pic}</a></h5>
<div style="height: 46px;">{$list.desc}</div>
</li>
</yunu:list>


在1.0.9版本中,需要在list處加上指定cid欄目

相關新聞

返回頂部

撥打電話
在線咨詢
掃碼添加微信咨詢産品相關問題

全國(guó)統一服務電話: 0511-85995956