首先,模板目录得存在搜索结果文件,即search_index.html
其次,首页或其他页面搜索框调用代码示范如下
<formaction="<yunu:urlname='search'/>"method="post"><inputclass="cont_text"type="text"name="key"value=""placeholder="请输入关键字"><inputclass="cont_btn"type="submit"name=""value=""></form>
最后,搜索结果页面读取数据
<yunu:listorderby="sortasc"keyword="$keyword"><li><h5><ahref="{$list.url}" rel="external nofollow" title="{$list.title}">{$list.pic}</a></h5><divstyle="height:46px;">{$list.desc}</div></li></yunu:list>
在1.0.9版本中,需要在list处加上指定cid栏目



