Table Of Contents:
See here. You can add this to your collection fieldsets via the partial fieldtype.
In the addon settings, pick the collection that has your Events.
Should look like:
events_collection: eventsPlease see the example calendar for how to create a monthly calendar using the {{ events:calendar }} tag.
start_date- Required - Start date of the event.start_time- Optional (seeall_day) - Start time of the event.end_time- Optional (seeall_day) - Start date of the event.all_day- Optional - boolean. If this istrue, then neitherstart_timenorend_timeare required
recurrence- Optional - One ofdaily,weekly,monthly,annually,everyinterval- Optional - required ifrecurrenceiseveryand indicates the frequency of the eventperiod- Optional - required ifrecurrenceiseveryand indicates the period of recurrence. One ofdays,weeks,months,yearsend_date- Optional - when is the last event. Ifrecurrenceis set and this is not, the event goes on foreverexcept_on- Optional - a list of dates to exclude
multi_day- boolean. When true,start_date,start_time,end_time,recurrence,end_dateare not useddays- Required - array of days:
multi_day: true
days:
-
date: '2019-11-23'
start_time: '19:00'
end_time: '21:00'
-
date: '2019-11-24'
start_time: '11:00'
end_time: '15:00'
-
date: '2019-11-25'
start_time: '11:00'
end_time: '15:00'
Tag pair that returns an entire month of dates, starting on a Sunday and ending on a Saturday.
Parameters:
month- defaults to current monthyear- defaults to the current year
Example:
{{ events:calendar month="october" }}
{{ date }} {{# date of event #}}
{{ if no_results }}
{{# whatever you need to when for an empty day #}}
{{ else }}
{{ dates }}
...other entry data...
{{ date }}
{{ /dates }}
{{ /if }}
{{ /events:calendar }}
Full example here.
You can also retrieve this data via the endpoint !/Events/calendar and pass the month (defaults to current month) & year (defaults to current year)
If there are no events on a given day, data returned is:
date: October 21, 2019
no_results: true
If there are events, each event has all the entry data plus date which is the next time this event happens:
date: October 21, 2019
dates:
-
...
date: Octover 22, 2019
...
-
...
Tag pair that returns a range of dates 2 required params, collection & next
collection- which collection has the eventsnext- a period that is parsable by DateTime. Examples include'2 weeks','90 days'
Example:
{{ events:in collection="events" next="90 days" }}
{{ date }} {{# date of event #}}
{{ if no_results }}
{{# whatever you need to when for an empty day #}}
{{ else }}
{{ dates }}
...other entry data...
{{ date }}
{{ /dates }}
{{ /if }}
{{ /events:in }}
Data:
If there are no events on a given day, data returned is:
date: October 21, 2019
no_results: true
If there are events, each event has all the entry data plus date which is the next time this event happens:
date: October 21, 2019
dates:
-
...
date: Octover 22, 2019
...
-
...
Tag pair that returns events today.
Parameters
collection- which collection has the events
Data and templating like the events:in tag.
Tag pair that returns the next X event dates. 2 required params, collection & limit.
One optional param, only relevant on multi-day, all-day events, collapse_multi_days. When true, multi-day events will only show up once in the event list.
Example:
{{ events:upcoming collection="events" limit="2" }}
{{ dates }}
...other entry data
{{ date }}
{{ /dates }}
{{ /events:upcoming }}
Data:
If there are no events on a given day, data returned is:
date: October 21, 2019
no_results: true
If there are events, each event has all the entry data plus:
date- which is the next time this event happensmulti_day-truewhen this is a multi-day event (like Thanksgiving or a conference)- when it is a multi-day event, there is also an array of
daysthat contains:start_timeend_timedate
- when it is a multi-day event, there is also an array of
all_day-truewhen an all day event (like a holiday)
start_date: October 21, 2019
multi_day: true
all_day: true
...
date: Octover 22, 2019
If there are no more dates, date won't be there or will be null
Pagination
If you want to paginate the results, add paginate="true" to the tag. Then the tag will look for a page query parameter and paginate appropriately.
Example
{{ events:upcoming collection="events" limit="2" paginate="true" }}
{{ dates }}
...other entry data
{{ date }}
{{ /dates }}
{{ pagination }}
{{ if prev_page }}<a href="{{ prev_page }}">Previous</a>{{ /if }}
{{ if next_page }}<a href="{{ next_page }}">Next</a>{{ /if }}
{{ /pagination }}
{{ /events:upcoming }}
Data
- All the usual data (above), plus:
paginate:
next_page: /events?page=3
prev_page: /events?page=1
Single Tag returns a url to download the event data and add it to your calendar. Tag presumes you are in an events context, i.e. your events entry
Parameters:
date- required if a recurring eventtype- required, supported opions are:google,yahoo,webOutlook,ics(for iCloud folks)
Example:
<a href="{{ events:download_link
start_date="{{ get:date }}" {{# getting the date from the `date` query param #}}
type="google"
}}">Google</a>