| 官方下载Pbootcms源码模板,安装后前台搜索受限,只搜索栏目编码为5中的内容。于是打开网站目录/template/default/html/search.php,发现第10行: {pboot:search num=12 order=sorting scode=5 field='title|content'} 中scode的值为5,将它增加更多栏目编码即可,用","号隔开,如:"scode=2,5,8"。 将代码: <!-- 搜索--> <form class="form-inline mb-2,5,8 justify-content-center" action="{pboot:scaction}" method="get"> <div class="form-group mx-sm-3 mb-2"> <input type="text" name="keyword" class="form-control" placeholder="请输入关键字"> </div> <button type="submit" class="btn btn-info mb-2">搜索</button> </form> 放到网站任何地方都可实现站内搜索。 |
Copyright © 2002-2024 Iszw.net All Rights Reserved. 川公网安备 51010702002244号
蜀ICP备2020035322号-1 本站已开启 IPv6 访问