improved page list filter

Permalink 1 user found helpful
Sorry if this is simply achievable, but I don't know how to do it.

Anyways - I would like to have additional options in page list to limit listing of pages from or up to specific Public Date or Today.

So you could show pages from today, or "archive" till today, or pages that fits between two dates ...

 
eOne replied on at Permalink Reply
Can someone point me to example how to limit or filter page_list database query pointing from today ?

Where should I change this query ?

I find reading all pages and then filter them in page list not optimized solution.
Tony replied on at Permalink Reply
Tony
check out the PageList class, in /concrete/models/page_list.php. you can search for "new PageList()" for some examples. Here's a quick example of how it's used:
$pageList = Loader::model('page_list'); 
$pageList = new PageList();
$pageList->filterByPublicDate(date('Y-m-d 0:00:00',(date('U')+60*60*24*36)), '<');
$pages= $pageList->get();
craftyCS replied on at Permalink Reply
craftyCS
This sounds possibly where I need to go to achieve what I need to do. I need to have a list of pages for employees. the page list needs to be sortable but not by the date it was created but by the date the person was employed/enrolled (so a date that the site editor puts into the page as an enrollment date). The also need to sort it alphabetically by name of the employee and have a thumbnail. Is this achievable with the panelist block?

thanks in advance
paul