Calendar:ICS_Subscription template tag
The Calendar:ICS_Subscription tag works similarly to Calendar:ICS_Export, but instead of downloading a one-time file, it allows users to subscribe to your calendar using an ICS URL. This provides a one-way sync, keeping events in the user's calendar app automatically up to date.
ICS subscriptions are supported by most major calendar applications, including Google Calendar, Apple Calendar, and Microsoft Outlook.
This tag outputs a pre-formatted ICS feed, so you only need to place it in a template, apply any desired parameters, and link to it. You can then share the resulting URL with users for subscription.
To enable ICS subscriptions, make sure ICS Sharing is turned on for the applicable calendar(s). This can be done from the Calendar control panel by clicking the green icon in the Manage column on the calendar list page. Once enabled, you may either:
- Use the
Calendar:ICS_Subscriptiontag in a template, or - Copy the ICS URL directly from the control panel and share it (privately or publicly).
All event dates in Calendar are stored and retrieved in UTC+0. This means an event entered at 6:00 PM will always be stored as 6:00 PM, regardless of location.
To ensure subscribed events display correctly across timezones, the Calendar:ICS_Subscription tag uses floating time, so events appear at the intended local time (for example, 6:00 PM) no matter where the subscriber is located.
{exp:calendar:ics_subscription}
Parameters
hash
This parameter is fed the unique hash value associated with the calendar to be subscribed to. It basically takes place of passing a calendar ID, with the added benefit of the site admin being able to revoke subscription access from users at any time. The hash value is available as a variable within the Calendar:Calendars tag. E.g. hash="{segment_3}".
category
This parameter allows you to export a specific set of events that belong to a category within a certain calendar by specifying a category ID. You can hardcode an category ID, pass it through an embed, or grab it from the URI. E.g. category="{segment_4}".
Examples
The following code is a complete example for handling the subscription of If you wish to export a single event or calendar, your code would look something more like this:
{exp:calendar:ics_subscription
hash="{segment_3}" {!-- Assuming linking like: site.com/calendar/ics-subscription/HASH --}
}