Calendars for Organic Groups - A simple tutorial for D6
This tutorial describes how to configure the Calendar View to have an individual calendar of events for each Organic Group.
Standard Calendar and Date configuration first:
1. Install Calendar and Date modules (copy the files to the server and enable modules, setup Date default settings under Site Configure)
2. Create new CCK content type (Content Management -> Content Types -> Create new content type) and title it, for example, Event.
3. Add to this Event a new field "Event Date" (of course, you can name that field however you want) and pick the display settings for it.
4. Change the view that displays the calendar - I recommend to enable the default view "calendar" and clone it, giving it a new name, for example "calendar_custom". After that, you can disable the original "calendar" view. We will be editing the new "calendar_custom" and the original view is our fallback, in case we mess things up so badly that we need to start from scratch.
5. Edit the "calendar_custom" view:
5a. Change the Filters: add "Node - Type: Event" because we only want the Events to be displayed on the calendar.
5b. Change the Fields: add your "Event Date".
5c. Change the Arguments: edit default "Date: Date (node)", scroll down to the "Date field(s):" and pick your Event Date (Content: Event Date (field_event_date)) instead of the default "Node: Updated date".
5d. Change the Fields: now you can hide or remove the default field "Node: Updated date".
6. Enable Calendar block. You may also want to enable it only to be displayed on the group pages.
Save the settings. At this point we should have a calendar and the Event type content.
When we create an Event, it shows up on calendar in every group, no matter to which group we assigned the Event. That's why we need to modify the view to fix that.
Edit the View to show Events related to the current group only:
Edit the "calendar_custom" view we created earlier.
Add new Argument "Organic groups: Groups" (for posts) and click Add. Change:
- Action to take if argument is not present: Provide default argument
- Default argument type: Node ID from URL
You can also add:
- Validator = Group nodes
That's it!
Help improve this page
You can:
- Log in, click Edit, and edit this page
- Log in, click Discuss, update the Page status value, and suggest an improvement
- Log in and create a Documentation issue with your suggestion