why not add another date field ?
thursday 31 march 2011 at 15h01 • categories : Announcement
Ionize provides several "date fields" in Pages and Articles.
The displayed date is calculated by Ionize for each article or page.
Couldn't this be enhanced ?
In this article, we will take the "Article" example, but that's valuable for Pages dates.
Ionize stores the following dates fields :
- Creation date : Automatically generated
- Updated date : Automatically generated, internaly used
- Publish On date : Choosen by user
- Publish Off date : Choosen by user
On the "view side", Ionize provides the <ion:date /> tag, which displays the article's date.
Great, but how it is working ?
For each article, Ionize checks if the "Publish On" date exists. If yes, this will be the displayed date, if not, it will take the creation date.
That seems logical, but a little bit light.
These time, I often had to develop website in which this article's date approach couldn't be used because the article should have a future date.
A very good example of that is an "incoming events" page : Each event must have a date in the future.
The first solution is to use an Ionize "Extend Field", to extend articles. Nice, but looks strange because the publish on/off dates are already implemented. More than that, it is not possible to use this field as standard date field to display archives.
Most of events websites (bands, museum, etc.) needs to display events by month or year.
The second option was to alter the database model and to create a new date field, so called "logical date".
A friend recently told me : "You can always alter the CMS to fit your personal needs, it will just help you at the moment but bring nothing to the community". I decided to hear him and decided to create this new field...
Hope this will bring you something !
This article can be discussed on this Ionize Forum thread.