0

I'm using Solspace Calendar and this code for showing single events...

{exp:calendar:events event_id="{segment_3}"}

and it works find for showing events in the future, however for past events it's showing No Results.

The past entry status are Open and there is no expiration date.

1 Answer 1

0

If you're looking to display upcoming or past events, you should use {exp:calendar:cal} instead of other Calendar tags. {exp:calendar:cal} is the only tag that will display event data in a chronological way. With this tag, the following tag would display events from 1 month past to now:

{exp:calendar:cal
    date_range_start="1 month ago"
    date_range_end="today"
    pad_short_weeks="n"
}

(You could throw in an event_id="" in there as well if needed to limit the list to an event) More details about why {exp:calendar:cal} is the tag to use for chronological data can be found here (Recommended read): http://www.solspace.com/docs/calendar/getting_started/

Quick summary: {exp:calendar:events} would be used for general information about the event entry (eg. event location, summary, start/end dates set in the entry), and {exp:calendar:cal} is used for most things related to time (eg. upcoming events, past events, events between X and Y, chronological order of events and their occurrences, etc).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.