Filtering CMS Items Based on Today's Current Date
A
Andrew Pons
It would be very useful if CMS filters could be applied based on the current date. For example, if I've got a Collection that contains upcoming events, I'd like to filter the list so that old events that have already happened are no longer displayed.
Currently it's possible to set a filter based on the date, but the date value is static—meaning I'd have to come in every day and manually update it to the current date in order to hide old events. It would be awesome if the date could be set dynamically to "today" or "current date" to make this filtering automatic.
Log In
A
Andrew Pons
- As frequently as is needed to keep the old events out of the list. It varies based on our events schedule.
- I'd imagine it would be useful for any field where the field type is "date." Right now for my purposes that only applies to our events CMS collection where I want to hide events that have already passed, but I could imagine other uses where showing/hiding items based on their relation to today's date (past or future) would be helpful. For example you could create a date field called "publish date" on a blog Collection and hide any CMS items where Publish Date is set in the future. This would allow you to basically schedule posts to become visible on a specified date.
- I don't have any time zone requirements currently, I would trust you all to figure out the best implementation for that. It could off local machine time or arbitrarily reference UTC or something like that.