On Sat, 06/22/2013 - 06:08
In last week, once i was working on calendar integration with organic group. on Drupal.org there are lots of discussion around this topic.
After lots of workaround i found an book page on drupal.org
I wanted to create a calendar for an Organic Group that is limited to displaying only events for a single group.
This can be done by creating a calendar in the normal way.
Then, once it is working correctly for all content, add an Organic Groups contextual filter to each display,
right before the date contextual filter.
Though this guide is perfect but caused trouble in organic group version 7.x-2.2 as there is change of fields.
I edited the book page too. It will not be immediately obvious how to do that, so here is how:
1) Be sure to enable the Organic Groups Context module (it comes as a part of the Organic Groups package).
This is needed to provide a method we can use to deduce which group should be displayed.
2) Edit the calendar view. Add a relationship to the view for "Group membership: Node group membership ".
Add a relationship to the view for "OG membership: Group Node from OG membership".(The Node group that is associated with the OG membership.)
3) Add a new contextual filter to each display. You will need "OG membership: Group gid ". Where it says "When the filter value is NOT in the URL" choose the option to add a default value and select the option "Current group from context".
You will need "OG membership: Group ID" ("Og membership "gid" property"). Where it says "When the filter value is NOT available" choose the option "Provide default value" and select the option "Current OG group from context".
4) Re-arrange the contextual filters so that the OG filter is before the date filter.
5) To see the calendar as a 'Calendar' tab on the Group node, change the path to 'node/%/calendar' and set it up to be a Menu tab with the name of 'Calendar'. When you view the group node you should see the tab, which in turn should show you the calendar.
I wanted to add "Add Date" link on the views page also. So here is how to add"Add Date" link
1) Find "Format" block on Views page.
2) Locate Show:Calendar Entities / Settings
3) Click on "Settings" link and a popup window will appear. Locate "Add new date link" dropdown menu, just above "Legend color" fieldset.
4) Select "Date" option on the dropdown and save it..
5) You will find "Add Date" link on the views page.
Now i wanted to achieve same on the calendar blocks also. I did the same process on the block display from steps 2 to 4.
After creating the block added block in appropriate region.
Now DON'T forget to configure block so that it should be displayed only on the nodes which has "Group" or "og" content type(i.e. the content type which you are using for group)
And you are done...Block is displayed.