Stanford Sites Event Importer takes data from the Stanford Event Calendar feed and populates event nodes on your site with the event information. Imported events will be included with your internally-created event listings at the URL path [your site url]/events.
You can import events based on an organization, audience group, event subject, as well as by event type on the Stanford Event Calendar.
Once the importer has been created, events will be imported and updated daily. If you want to import events immediately, you can use the Save & Import button (found within the Events Importer editor).
Stanford Events Calendar Update: On Feb. 1, 2022, Stanford launched a new campus-wide events calendar. Stanford Site can import events from the new Localist Stanford Events Calendar, as well as the Stanford Events (legacy) Calendar. This page will provide a step-by-step guide on how to:
- Import Events from the new Localist Stanford Events Calendar
- Display Events using the Localist Widget
- Turn off an import from (legacy) Stanford Events Calendar.
Stanford Events (legacy) calendar
The Localist Stanford Events calendar replaces the previous Stanford Events (legacy) Calendar.
Existing links that were imported from the legacy calendar will remain on your site, and the links will continue to point to your events in the legacy calendar. If you decide to create the same event in the Localist calendar, you will have to import it into your site and delete the previously-imported Event from your site.
How to turn off the legacy Stanford Events importer
After you begin importing events from the Localist event importer, you'll want to stop importing events from the legacy importer.
- Navigate to Configuration > Importers > Events Importer to see the Events Importer configuration page
- Find the Events to be Imported section.
- For the importer you want to turn off, set each field back to its default:
- Set the Event Group Option to Select Option
- Set the Organization to Select Organization
- Set the Event Group Option to Select Option
- Scroll to the bottom and click Save.
Using the Localist Stanford Events importer
When you import events from Stanford Events Calendar your site creates event nodes and allows you to display these events on your site.
To import events
- From your site’s admin menu select Configuration > Importers > Events importer
- Scroll down to the Localist URL section to import events from the Localist Stanford Events Calendar.
- Add filters to import events based on Audience, Subject, Event Types, Departments/Groups and/or Venues.
- Once you are satisfied with your import selections, scroll to the bottom of the page and select either:
- Save & Import: Saves your selections and executes an import update immediately
- If you selected Save & Import you should see a message about the number of events imported.
- Save: Saves your selections, but executes an import during daily import
- To see the imported Events, from your site’s admin menu go to All Content and filter by the Event Content type.
Events are be imported and updated daily. To execute an update immediately select Save & Import.
If a department or group is not showing as expected, click Update Org & Category Options to refresh with the latest list of Departments/Groups and Categories from Localist.
What will be imported?
Using the importer pulls events from Stanford Events Calendar into your Drupal site so that content becomes part of your content library. You can display or reuse the Event content within your site. The Event Importer will import the following fields:
- Event Type
- Event Title
- Body Content (from the Localist Description field)
- Date & Time (Start Time and End Time)
- Note: If you don’t have an End Time in Localist, the importer sets the End Time to match the Start Time. Only the Start Time will be displayed on the Event.
- Event Place
- Link to view the event on Stanford Events Calendar
Note that by default, Events imported from Localist will link to the event on Stanford Events. If you want to display the event on your site instead, edit the External Source field to remove the URL.
Also, note that events remain editable on Localist. When you update an event on Localist, it will be imported the next time the importer runs, and it will update the existing Event node on your site. However, this only works one way: if you update an Event node on your website, it will not push the update to Localist.
Questions about using the Localist Events importer? Submit a Help Request.
More on the Localist importer
How do you delete an event importer?
To remove an events importer, remove the criteria from each field item on the importer configuration page. When you save it, the importer will be removed.
- Navigate to Configuration > Importers > Events Importer configuration page
- Remove the criteria from each field.
- Scroll to the bottom of the page and click Save
How do you delete all the events from an importer?
How do you display just the events from a particular event importer?
You cannot simply display just the events from a particular importer. Once the events are imported, they’re just regular Drupal content. It is possible to manually specify and display your events by event type after they have been imported.
Once an event is imported, it has a redirect that points back to the event page on Stanford Events Calendar.
Events that have previously been imported, are on the legacy events calendar, and have redirects, will no longer work.
Display Events using the Localist Widget
Rather than import all the events into your site, it is possible to create a Localist widget that displays your events and then embed the widget into your site.
Build your Stanford Events Localist widget
- Go to the Stanford Events Calendar Build an Events Widget page.
- Choose a style template and number to items to display
- Generate a list of events by selecting the content you want to include from the drop-down menus. Learn more about building an Events Calendar Widgets.
- Click Preview Widget to review what it will look like.
- When you’re ready, click the Generate Widget Code.
Add Stanford Events Localist widget to your site
- Copy the embed code.
- Returning back to your Stanford Site, from your site’s admin menu navigate to All Content > All Media > Add Media > Embeddables.
- Paste the code in the Embed Code box.
- Enter a name for the widget that describes the content, for example, “BeWell Events Localist Widget.”
- Click Save.
Once the embedded has been added to your site's media library, use the text area paragraph type to display events.