Page List Date Filtering

Permalink
What are the chances of having an option on the page list block which would allow you to filter out items which have a public date in the future, or items which have an expiration date in the past?

From what I can tell the follow code (with two addition btPageList columns, and a date attribute named expiration_date on collections) would achieve that functionality.

if ($this->list->filterByPublicDate) {
    $this->list->filterByPublicDate(date("Y-m-d 00:00:00"), "<=");
}
if ($this->list->filterByExpiration) {
    $list->list->filterByAttribute('expiration_date', date("Y-m-d 23:59:59"), ">=");
}


I'm in the process of creating a new package to use internally, but is this something other people would use if it was in core?

Drawbacks:
the pages are still accessible if a user navigates directly to them.
the pages would still show in autonav blocks
pages would still be in sitemap.xml files

Pro:
Users could create news / blog posts in advance
Users could have pages expire
Advanced permissions would not need to be enabled to accomplish these items

Any thoughts / input would be great

triplei
View Replies:
MrKDilkington replied on at Permalink Reply
MrKDilkington
Hi triplei,

There is current development on something like this, I believe. Which is excellent news because it is very useful and commonly needed.

https://www.concrete5.org/about/roadmap/...
- Basic Calendar/Event page types built into the core.

https://github.com/concrete5/concrete5-5.7.0/branches...
- feature/calendar


In the meantime, I made a free modified Page List block that will sort event pages by date/time attribute and offers event expiration based on a custom time.

Please feel free to use it or improve it.

http://www.concrete5.org/community/forums/5-7-discussion/free-sligh...