Drupal 7 Event Calendar
Prepare an Event-Calendar for Drupal 7
Last updated September 27, 2013. Created by wusel on March 11, 2012.
Edited by colan, scalico, wmostrey. Log in to edit this page.
This Cookbook shows, how you can prepare an event-calendar for Drupal 7, using the new method to create new calendars from a template.
Cookbook:
Step 1: Before we start
- If not enabled, download the modules Ctools (http://drupal.org/project/ctools), Calendar (http://drupal.org/project/calendar), Date (http://drupal.org/project/date) and Views (http://drupal.org/project/views) and install them to your modules-path like
sites/all/modules
.
Visit 'http://example.com/admin/modules
' and enable the modules "Calendar", "Date" and "Views UI". After Clicking on "Save configuration" click "Continue" to enable all required dependencies too. - Visit '
http://example.com/admin/structure/types
' and click on "Add content type".
Name ='Event', Description like 'An event with a title, date/time information and a body for storing details.'. Then click on "Save and add fields". - In line "Add new field" select Type of data to store = "Date (ISO format)", Label ="Event-Date", Field name = "field_event_date", Form element to edit the data = "Text field", then click on "Save".
- On the page "Field settings": set "Collect an end date" to yes and "Time zone handling" to "No time zone conversion" [1] and then click on "Save field settings".
- On the page "Event settings" set "Required field" to yes and then click on "Save settings".
- Only if you want:
Visit 'http://example.com/admin/structure/types/manage/event/display
': on "Custom display settings" set all options (like "Teaser") to no and then click on "Save". - Visit '
http://example.com/admin/structure/views/add-template
' and add "Calendar - A calendar view of the 'field_event_date' field in the 'node' base table.". On "/admin/structure/views/view/calendar/edit" click on "Save". - Visit '
http://example.com/admin/config/date/calendar
' and do the Calendar Administration. - Add a second menu-entry if you like, e.g.: Menu link title = "Event-Calendar", Path = "calendar-node-field-event-date".
- Set the calendar-blocks for "View: Calendar" visible as you like on '
http://example.com/admin/structure/block
'.
Step 2: Add one or more events
To test: Click on "Add content" in the Navigation-menu, select "Event":
Title = "My first event", Body like "This is the first event", change nothing, Click on "Save".
Later you have to enter/import the event-time in the timezone of the location of the event. [1]
Step 3: View the event-calendar
Visit 'http://example.com/calendar-node-field-event-date
'.
Notes:
[1]: This is the recommended setting, which later cannot be changed, without deleting all events prior to that! If you choose the "Time zone handling" to "No time zone conversion", then there is no changing of the time of the event between adding/importing and viewing, neither in summertime nor in wintertime. You have to enter/import the event-time in the timezone of the location of the event (like the flight-time on an airport, this is always local time/local timezone. The difference between the time of departure and arrival is different from the flighttime, if the timezones of the two airports are different).
[2]: If you use the module Feeds (http://drupal.org/project/feeds) to import events, please patch Feeds until issue http://drupal.org/node/722740#comment-5373838 is patched to the module.
[3]: If you update the calendar-module it may be necessary to delete the old calendar-view and create a new calendar-view using this Cookbook.
- Printer-friendly version
- Log in to post comments
- 5838 reads