If you are using the YaleSites Calendar feature, site visitors might want to add your events to the calendar on their phone, google calendar etc. As the site administrator you might want to import your events from another calendar such as a Google Calendar. In order for this functionality to be available as part of your Calendar Feature, you must create an iCal (or iCalendar) feed and attach it to your calendar or the individual events on your calendar.
iCal is an Internet file format that allows you to do just that, share events on your calendar between various calendar products used by your site visitors. There are 2 main ways you might want to share information on YaleSites Calendar:
- Importing events into the calendar from other calendars - Google Calendar, etc.
- Exporting events from your calendar to other calendars on various devices – phone, tablet, etc.
This tutorial will provide you with instructions for adding the iCal feed to your calendar or individual event so site visitors can import your events to their calendars, and importing events from external calendars, in this case a Google Calendar.
Important Note: if you are importing your events from the Yale Institutional Calendar (Bedeworks) you can use the pre-built feature. Instructions can be found here.
Enable Necessary Modules
The first step is to enable the necessary Modules.
- YaleSites Calendar Feature – by default this is already setup.
- Date iCal
Creating an iCal Feed for Your Calendar
Create a Custom Display Setting on the Events Content Type
All Content Types allow you to create custom displays so you can show/hide and arrange fields for the unique requirements of that display. Once you have enabled the Date iCal module, a Custom Display for iCal is available.
- Structure > Content Types > Event > Manage Display
- Scroll down to the gray Vertical Tabs
- Click on iCal
- Scroll back up to the top, still in Manage Display tab and you will now see an iCal button.
- Click on it and arrange the fields you want to display in the top section and in the order you would like them.
Create the Feed Display in the Calendar View
- Click on the Calendar link in your Main Menu to view the YaleSites Calendar Feature.
- Hover over the right corner of the page to expose the gear icon. Click on edit View.
- Click on the +Add button in the display listings and select Feed. A new Feed Tab displays in the listing.
- Click on the link Format: RSS Feed and change to iCal Feed, then click Apply.
- Add the Calendar name to the settings.
- Click on Content and choose iCal Fields, then apply.
- Map the field names in the following way:
- Date Field = Event type Start Date
- Summary field = Body
- Location field = Location
- Click on Apply
- Scroll down to Filter Criteria and set the to include Content: Type = Event
- In the Feed Settings section (middle pane), set the path to ‘calendar/%/export.ics’, including a /%/ for the Contextual Filter.
- Click on the link next to Attach and select the display(s) you want to attach the standard iCal feed icon to.
- Make sure the Pager options are set to ”Display all items”.