Welcome Guest, Not a member yet? Register   Sign In
Date Effective Content
#1

[eluser]Unknown[/eluser]
Any suggestions on the best way to use CI to build websites where:

1. Content is date-effective, i.e., only displayed if active
2. "Clickable" for editing
3. Page layout & style easy to build by outsourced talent

Having date-effective content ensures time-sensitive content is displayed only when it should be. In addition, the effective date can be set in the future to review/approve, and set in the past to explore archive.

"Clickable" editing eliminates navigating an admin menu to find where to update content. Using AJAX, it's also quick.

Non-technical graphic artists will design the web page layout and styles, so selecting and placing content on a page must be super easy to learn and use.

It's clear to me that a class is needed for each content category to handle specific requirements, and a "content management (CM)" class is needed to handle all the common things such as display of only currently-effective content. The database would have a CM table with the effective begin and end dates, who inserted and edited the content and when, etc. Every content category class table would be linked to the CM table.

But I'm not sure about the best way to handle the control, model and view of the CM class and the various content category classes. (I'm new to CI, strong in PHP and Javascript.) So I'm guessing the various category controllers would extend the CM controller and inherit the CM controller's handling of, say clicking on a textarea to edit it. Or maybe a CM library of functions?

But would a CM controller function be passed all the particulars of the textarea, or would that category's controller call CM controller functions? Or perhaps functions in a CM Library?

Each category's model would join to the CM table, that's easy. But there needs to be a common place where the current effective date is accessed and a "get" function to retrieve only rows whose date range includes that date (which may not be today's date).

What about the views? Just one CM view that is passed lots of parameters, or a view for every category that whose portion of the page is included in the CM "master" view that is actually output?

And maybe I'll get lucky and someone will point me to where this problem has already been solved. :-)




Theme © iAndrew 2016 - Forum software by © MyBB