I have a working getResources call that displays all “Event” objects in a folder in ascending order by date. It works perfectly. As each individual event object has a preset unpublish date and time, I am attempting to create a slightly modified getResources call that displays only the “past” events in descending order by date.
I hid the call using <!– –> so I could first see if it successfully loaded ONLY the unpublished past events, and it worked: When I viewed the source of my page, I could see that the correct output was being retrieved. So I un-commented the call and saved the page, only to see that it is now displaying ALL the events! If I re-comment out the code, it still displays the correct output, but not if I make it visible. What dark magic is this?
Here’s my first snippet call:
[[!getResources:default=<p><em>There are no events or appearances scheduled at this time.</em></p>?
&parents=5
&depth=0
&limit=0
&showUnpublished=0
&processTVs=1
&includeTVs=1
&includeContent=1
&tpl=eventCalendarTpl
&sortbyTV=eventDateTime
&sortdirTV=ASC
&debug=1
]]
And here is the problematic one:
[[!getResources?
&parents=5
&depth=0
&limit=0
&showUnpublished=1
&where={"published" : false}
&processTVs=1
&includeTVs=1
&includeContent=1
&tpl=eventCalendarTpl
&sortbyTV=eventDateTime
&sortdirTV=DESC
]]
It seems so basic, which is why I’m so confused. I have never witnessed something like this before. (If you visit Events - Carla Kaplan - Writer, Professor, Editor | Official website you can see the live page and view the source to see what I’m talking about.)
Thanks in advance for any advice/insight/help!
Michael