Last updated 17 November 2014. Created on 23 November 2011.
Edited by scor. Log in to edit this page.

This tutorial describes how to build a listing of event pages and how to annotate them using the module. The goal is to create a page that displays information for a list event which can be previewed in the Google Rich Snippets Testing Tool. We will use the Event type which is one of the types recognized by Google.

Google Rich Snippet preview for a listing of events powered by Drupal 7, and RDFa

Background Information is a collaboration of Google, Yahoo! and Bing to standardize the way structured data is added to web pages. The vocabulary includes descriptive terms for content like movies, people, organizations, events, locations, etc. The goal is "to improve the display of search results, making it easier for people to find the right web pages."

Step 1: Setup and create event pages

First, please follow the previous tutorial which explained how to setup an event content type with, and create a few events.

Step 2: Create a listing of events using Views

Next you need to create the list of events order chronologically. Install the Views module. It is a very popular modules and chances are you are already using it on your site.

Browse to Structure -> Views and add a new view. Fill the name "My listing of events", choose "Event" in the second drop down list type, and choose "Unsorted" in the sorted by drop down. Further, in the Display format section, choose Full posts in the second drop down. Click Continue & edit.

The base for your listing is ready. You only need to add a sort criteria on the field "Content: Date", and select the sort you prefer. Sort ascending will list the upcoming event first. Make sure to hit "Save" on the top right corner of your view. Then you can view your list of events by clicking on "View page". Those familiar with Views will be able to tweak the view to their liking. Tip: If you don't know how to use Views yet, you should check it out, it is very powerful :)

listing of events view

We have successfully added a type and properties to our Drupal page. The listing of events page can now be tested in the Google Rich Snippets testing tool, simply paste the URL of the node and hit preview.


If you experience difficulties setting up your listing of events view, or if it cannot get it to preview correctly in the Google Rich Snippets testing tool, please file a support request in the module issue queue.

Looking for support? Visit the forums, or join #drupal-support in IRC.