I am building an events section on a client's website. I have 2 pages, one pulling out future events and another archiving the events that have passed. If I use publishedon for the event's start date and unpub_date for the event's end date, how do I show only the unpublished events on the archive page?
In MODx Evo I would have used Ditto with the following properties: &filter=`published,1,2` &showPublishedOnly=`0`
But is there a way to do this using getPage with pagination of the archive page?
Maybe the only way is to get the current date and use the &where=`` parameter to see if the event end date is less than the current date?
-
☆ A M B ☆
- 350 Posts
Did you ever get a resolution to this - as I'm looking for a solution too?
Thanks
Helen Warner
Number one pixel!
Proud to be linked with MODX at
Crimson Pixel
&previewUnpublished=`TRUE` &where=`{"published:=":"0"}`
-
☆ A M B ☆
- 350 Posts
That isn't a property for either getResources or getPage and unfortunately doesn't work.
Helen Warner
Number one pixel!
Proud to be linked with MODX at
Crimson Pixel
How about this?
&where=`{"published:=":0}
---------------------------------------------------------------------------------------------------------------
PLEASE, PLEASE specify the version of MODX you are using . . . PLEASE!
MODX info for everyone:
http://bobsguides.com/modx.html
-
☆ A M B ☆
- 350 Posts
Thanks Bob, that works a treat! Sometimes its the simple stuff you miss....
Helen Warner
Number one pixel!
Proud to be linked with MODX at
Crimson Pixel
I'm glad it worked for you. Thanks for reporting back.
---------------------------------------------------------------------------------------------------------------
PLEASE, PLEASE specify the version of MODX you are using . . . PLEASE!
MODX info for everyone:
http://bobsguides.com/modx.html