Problems, need help? Have a tip or advice? Post it here.
14 posts Page 2 of 2
This is some awesome support here. KK I am impressed!
* * * * * * I LOVE COUCH CMS - flexible and straight forward * * * * * *
I tried following along and still haven't figure it out: I want to have two event listings (no calendar or detail view). Is it possible to show just the next, say, 5 events from today on? How would I show just past or just future events. I think the publishing date is set to the event date?

Hi @superdau,

I think you'll find the following thread useful as it deals with fetching pages based on dates -

The solution to your specific problem could be the following (assuming the publish date is set as the event date):
Code: Select all
<!-- set a variable named 'today' with current date in Y-m-d format -->
<cms:set today="<cms:date format='Y-m-d' />" />

<!-- fetch all pages starting from today -->
<cms:pages masterpage='events.php' start_on=today show_future_entries='1'>
    .. data from all regions available here ..

<!-- fetch all pages before today -->
<cms:pages masterpage='events.php' stop_before=today>
    .. data from all regions available here ..

Hope this helps.
Thanks a lot KK, I'll try that out...
14 posts Page 2 of 2