Code Igniter 项目的内联编辑(类似 mojomotor)?
因此,我在 Code Igniter 中构建了我的网站,并且有很多页面,我认为如果客户可以内联编辑内容,这将是最简单的 - 就像 MojoMotor 提供的那样。
我对使用 mojomotor 不感兴趣,但我想知道是否有人为他们的代码点火器项目做过类似的事情?
作为它如何工作的想法: 我认为客户端管理员用户可以登录到正常的自定义管理 CMS 区域。登录后,设置会话后,他们可以浏览公共站点以查找选定的页面。
这些页面将检查内置的管理会话,如果存在,它可以包含一个 js 文件,该文件将覆盖管理横幅并以某种方式启用字段(可能是具有与相应表相关的特定 id 或类的内容 div) /DB 中的字段)进行编辑。
--编辑--
我见过不少 js 内联编辑器。我想我的困惑在于如何最好地将它们与我的数据库和控制器集成 - 即让 div id/类以某种方式映射到 db 字段的想法。
So I've built my site in Code Igniter and there are a number of pages where I feel it'd be easiest if the client could edit the content inline - much like what MojoMotor offers.
I'm not interested in using mojomotor but I wondered if anyone had done anything like this for their code igniter project?
As an idea of how it could work:
I was thinking that the client admin user could login to the normal custom built admin CMS area. After logged in, with session set, they can browse out to the public site for selected pages.
These pages will have a check for that admin session built in and if it's present, it can include a js file, which will overlay an admin banner and somehow enable the fields (perhaps content divs with a certain id or class relating to the corresponding table/field in DB) for editing.
--EDIT--
I've seen quite a few js inline editors around. I guess my confusion is over how best to integrate them with my database and controllers - i.e. idea of having the div id/class somehow map to the db field.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
最重要的是,MojoMotor 是一个 CodeIgniter 应用程序,而不是一个库。因此,尝试将代码添加到现有的 CodeIgniter 项目中并不是一个真正的选择。
但如果您愿意,您可以将 CodeIgniter 项目集成到 MojoMotor 中,并获得两者的好处。 这是一系列文章如何做到这一点。
The bottom line is that MojoMotor is a CodeIgniter app and not a library. Therefore trying to work the code into your existing CodeIgniter project is not really an option.
But if you're willing, you can integrate your CodeIgniter project into MojoMotor and have the benefits of both. Here is a series of articles written on how to do this.
此是您正在查找的代码示例之一。您必须调整该方法以与 CI 一起使用
This is one example of the code you are looking for . You'll have to adapt the method for use with CI