8.2. Creating a Page Manager
Now that you understand Claudia's need for some simple page management (and to be clear, all she needs is a simple way to create and edit just a handful of pages), you can get started on the work. When creating a page manager, you need to keep several things in mind before you even start working.
You're not trying to build a full-on content management system. There's no need to get wrapped up in issues like workflow, privileges, and other advanced criteria.
You want to have an easy way to allow for WYSIWYG creation of HTML content. You'll likely be integrating some kind of online editor like TinyMCE or Xinha.
Don't forget that at some point you also need to integrate with the Welcome controller and the public pages.
You will need to take this in stages. First comes the database table (which will hold all the data involved with individual pages), then the model, then the controller, then the admin pages (the views that users actually interact with), then integrating the WYSIWYG editor, and finally, making it work with the Welcome controller.
8.2.1. Creating the Database Table
First things first, and that means creating the database table. In true Agile form, take the most straightforward path and create a table called Pages. The Pages table should have a primary field called id (which is de rigueur), and fields for a page name/title, keywords, description, status, the page content, and a short path.
Of all of these fields, the path is the least transparent ...
Get Professional CodeIgniter® now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.