The calendarfeed shortcode displays the next eight upcoming events from any existing calendar on the montclair.edu calendar. The calendarfeed shortcode requires an id parameter.
The shortcode itself only shows the events – so it’s a good idea to put other elements around it to give it some context – like an h2 tag above and a buttonrow below to the full events feed.
Tip: If your calendar feed looks unbalanced, consider rewriting your event titles and summaries for consistency. Also, ensure that each item has a thumbnail image.
calendarfeed Attributes
Name | Possible Values | Required | Notes |
---|---|---|---|
enddate | A date in YYYY-MM-DD format | No | An ending date. When a start date and end date are specified, maxevents is ignored. |
id | A valid calendar ID number | Yes | You can display multiple calendars by providing a comma-separated list of numbers. |
maxevents | A number | No | Sets how many events to display on a feed. |
metakey | The name of a meta field in the calendar | No | If specified, the feed will only display events where the key is set. |
metavalue | The value of a piece of metadata | No | When used in combination with metakey, the feed will only display events where they key is set and equals the value. |
noimages | true or false | No | When set to true, images will be hidden. |
startdate | A date in YYYY-MM-DD format | No | A starting date. When a start date and end date are specified, maxevents is ignored. |
vertical | true or false | No | When set to true, events will be shown as a list instead of rows of thumbnails. |
In University calendar system events, you are able to create as many pieces of metadata as you’d like, with any combination of keys and values. Just be aware that this information is visible to calendar users. For more details on how to set metadata values within events in the University calendar system, please email webservices@montclair.edu.
Example
Code Sample
Individual calendar event feed:
<h2>Upcoming Events</h2> [calendarfeed id="17"] [buttonrow][button]<a href="http://www.montclair.edu/calendar/?calendar=17">View More Events</a>[/button][/buttonrow]
Combining Multiple Calendars
In rare cases, it may be necessary to display events combined from multiple calendars. To do so, simply include several calendar ID numbers separated by commas. For example, below is a combination of the Cali School of Music calendar and the Peak Performances calendar.
Code Sample
Combining calendar event feeds:
[calendarfeed id="3,62"]