迅睿CMS按照模块不同类型进行搜索显示指定模块内容
<form class="search-form" action="/index.php" method="get">
<input type="hidden" name="s" value="news">
<input type="hidden" name="s" value="image">
<input type="hidden" name="s" value="article">
<input type="hidden" name="c" value="search">
<input type="text" name="keyword" class="keyword" placeholder="输入关键字搜索 ..." />
<button type="submit" id="search-form-button" type="submit" class="submit">
<i class="wpcom-icon wi">
<svg aria-hidden="true">
<use xlink:href="#wi-search"></use>
</svg>
</i>
</button>
</form>
以上调用标签只可选取1种模块内容进行搜索,还待完善搜索字段。
注释: 1、加入 <input type="hidden" name="s" value="news"> ,说明搜索news模块的内容。
2、加入 <input type="hidden" name="s" value="image">,说明搜索image模块的内容。
3、加入 <input type="hidden" name="s" value="article">,说明搜索article模块的内容。
目前迅睿CMS官方公布,暂时不支持全局搜索(不支持不指定栏目搜索),意思就是,必须指定一个栏目内容进行搜索。
相关文档:
https://www.xunruicms.com/wenda/52349.html
内容模块搜索框写法:
<form class="search-form" action="/index.php" method="get">
<input type="hidden" name="s" value="news">
<input type="hidden" name="c" value="search">
<input type="text" placeholder="搜索内容..." name="keyword">
<input type="submit" value="提交搜索" />
</form>
https://www.xunruicms.com/doc/746.html