1

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.

orchid
  • 11
  • 4
  • I'm not sure this has much to do with CodeIgniter. My suggestion would be to find a third-party inline editor, there are open source ones available, and integrate it into your site. – King Skippus May 31 '11 at 04:14
  • Yep, this isn't really codeigniter, more HTML/JavaScript. – AlunR May 31 '11 at 07:22
  • This may be exactly what you need: read below for using MojoMotor's inline editing functionality, without actually having the site be a MojoMotor site (it does need to be codeigniter though but you've said that's the framework used). http://www.teamdf.com/web/mojomotor-codeigniter-hybrid-site-part-one/113/ –  Feb 03 '12 at 00:58

2 Answers2

1

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.

0

This is one example of the code you are looking for . You'll have to adapt the method for use with CI

Awais Qarni
  • 17,492
  • 24
  • 75
  • 137
AlunR
  • 455
  • 3
  • 10