Automatically create .ics file so users can 'Download to calendar'


Matrix Version:

I have an asset listing page showing Calendar Event assets that works well. When a user clicks on an event to view its details, I would like that page to include a ‘Download to Calendar’ link that downloads an .ics file. I have looked through the forum and manuals and I couldn’t find anything that shows me exactly how to download an individual .ics file. A lot of the info is also quite old.

I have seen this in action on other matrix sites so I know its definitely possible. I think it has something to do with creating a special design, a paint layout, use ‘BEGIN:VCALENDAR…’ etc but I don’t know how to put all of it together without a bit of help.

Does anyone have a link to a complete tutorial or can provide the full steps I need to follow to have a ‘download .ics’ link on the Calendar Event page?


(Nic Hubbard) #2

You need to create a new Design asset with the following:

<MySource_PRINT id_name=“global” var=“content_type” content_type=“text/calendar; charset=UTF-8” />
<MySource_area id_name=“body” design_area=“body” />

Then add that to your calendar pages as a user defined design which you can then call on the page using something like:

That is how we do it on the PUC website: