PbootCMS如何实现后台列表页搜索字段修改为自定义字段
source link: https://www.huhexian.com/18713.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
PbootCMS如何实现后台列表页搜索字段修改为自定义字段
我们在使用PbootCMS制作网站的时候,创建新模型后,导致后台列表显示页中的搜索功能失效,很多小伙伴不知道是什么原因造成的,其实那是因为搜索字段默认为title而我们要搜索的不是这个字段,所以就搜索不出你所要的内容。下面就来为大家解决PbootCMS后台列表页搜索字段修改为自定义字段。
首页打开 apps–>admin–>model–>content 中的 ContentModel.php 文件。
修改函数 public function findContent($mcode, $scode, $keyword) 中相关代码:
在大概 115 行处加入 ‘content_ext.*’ 代码;
在大概 134 行处加入以下代码:
- array(
- 'ay_content_ext content_ext',
- 'a.id=content_ext.contentid',
- 'LEFT'
在大概 147 行处 把原来的代码 ->like(‘a.title’, $keyword) 修改成你要搜索的自定义字段 ->like(‘content_ext.ext_zsm’, $keyword),修改完后的效果图如下:
历史上的今天
Recommend
-
31
设计后台产品有句口诀:“展示列表优,编辑弹窗佳,筛选下拉好,组合查询棒”说的就是后台产品设计的小技巧。 后台产品设计是一个产品经理的核心能力,也是比较基本的能力,今天我用一篇文章给大家介绍一下后台产品列表页与添加页的设计规则,将我这段时间在后台产品...
-
6
ZBlog自定义列表文章数和分页按钮数 类别:编程 日期:2021-05-21 评论:1 ZBlog的后台页面设置中有个列表页显示文章的数量的设置项,用来控制文章列表页面每...
-
6
作者:Manuel Matuzovic译者:前端小智来源:matuzo有梦想,有干货,微信搜索 【大迁世界】 关注这个在凌晨还在刷碗的刷碗智。本文 GitHub
-
5
dedecms如何转pbootcms教程 织梦数据无损栏目路径不变转换Pbootcms方法 2021-10-13
-
3
响应式供应链网站pbootcms模板,进出口服务企业网站源码发布于 今天 02:36 (自适应手机端)响应式供应链网站
-
5
利用代码实现WordPress后台添加自定义批量操作文章功能 2022-01-0613:39:39评论 默认
-
5
HarmonyOS 自定义列表组件-51CTO.COM HarmonyOS 自定义列表组件 作者:韦海 2022-04-24 15:17:56 根据鸿蒙官网组件,结合相关技术,尝试列表组件的封装,提高开发的效率。
-
4
搜索列表-CSDN商城 品 类: 全部 3C数码日用百货休闲食品实体书电子书工具云CSDN周边 商品分类: 经济计算机与互联网管理大中专教材教辅小说
-
8
企业级自定义表单引擎解决方案(十八)--列表视图属性设置 表格对于后台管理类的系统来说,至关重要,系统大多数功能...
-
8
odoo 为可编辑列表视图字段搜索添加查询过滤条件 Odoo...
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK