In this video, I will show you how to create an iCal feed of our calendar. Visitors will be able to subscribe directly from the page, or download an .ics file.
Install modules
Now, let's install the iCalcreator Plugin
Install iCalcreator Plug-in
- Download iCalcreator by clicking the "Download Zip" button
- Unpack the file and rename it to "iCalcreator"
- Copy the file to "sites/all/libraries" directory
- Clear the cache
- Go to "Configuration => Development => Performance" (admin/config/development/performance)
- Clear cache
- (Clear all caches)
Enable module
- Go to "Modules" (admin/modules) and enable:
- Date iCal (This module allows users to export iCal feeds using Views)
- (Save configuration)
To confirm that the iCalcreator Plug-in is installed correctly:
- Go to "Reports => Status report" (admin/reports/status)
The row for "Date iCal" should be green
Now, let's create a custom display mode for the Event content type to be used for ical feeds.
- Go to "Structure => Content Types => Event => Manage Display" (admin/structure/types/manage/event/display)
- Click "Custom Display Settings"
- [x] iCal
- (Save)
- Click the "iCal" subtab
- Event Details
- Format: Select "Trimmed"
- (Save)
Next, let's go to views and add a feed display to the Calendar view
- Go to "Structure => Views => Calendar" (admin/structure/views/view/calendar/edit)
- Click "Add" to add a display
- Choose "Feed"
Title
- Click "Calendar"
- For: This feed(override)
- iCal Feed
- (Apply(this display))
Format
- Click "RSS Feed"
- [x] iCal Feed
- (Apply)
- iCal Calendar Name: My iCal Feed
- (Apply)
- Click "Content" next to "Show"
- iCal Entity
- (Apply)
- (Apply)
Feed Settings
- Path
- Click "No path is set"
- calendar/%/ical.ics
- (Apply)
- Attach to
- Click "None"
- [x] Month
- (Apply)
Pager
- Click "Display a specified number of items"
- [x] Display all items
- (Apply)
- (This feed(override))
- (Apply(this display))
- (Save) (Save the view)
Click "view Month" to see the attached feed. You should see the iCal icon at the bottom of the view's output. Click on the icon to subscribe on this calendar. By default, the feed URL uses the webcal:// scheme, which will load the events directly to the calendar application set up on your computer. However, if you prefer that users will download the iCal feed as a file, go back to your view configuration page and disable the "webcal://" option.
- Go to "Structure => Views => Calendar" (admin/structure/views/view/calendar/edit)
- Select the Feed display
Format
- Format
- Click "Settings"
- [x] Disable webcal://
- (Apply)
- (Save)(Save the view)
Go back to you calendar and click the iCal icon. This time you'll see that we will download the iCal feed as .ics extension file.
In the next video, I will show you how to import dates from an external iCal feed.