This is my first experience with Graffiti.
I have been asked to make a change to a new client's existing site.
The goal is to list the Past Events in date DESC order, while keeping the Upcoming Events in date ASC order.
The site seems to have been set up (by the original developer) so that Events is a single category, set as date ASC sort order. The Upcoming Events page uses a foreach loop to print out this list, filtering out events with dates that have passed.
The Past Events page uses the SAME foreach loop to print out the SAME list, but this time filtering out events with dates that have not yet passed.
The problem is that then BOTH lists are sorted as date ASC. I want to reverse the order of the Past Events foreach loop so that the event that happened last week appears at the top, and events from 2009 appear at the bottom.
I've been searching and reading through this documentation, and can't find anything.
Here is the foreach loop in question:
#foreach($post in $data.PostsByCategory("events", 9999))
## show expired events
<li class="event"><span class="date"><h4>$post.Custom("Event Date")</h4></span>$post.Body</li>
## show upcoming events (in the upcoming events list the if above is empty and this else has the <li>)
I appreciate any help...