Organic Group Calendars and Dates integration Drupal 7

  • 22 June 2013
  • mohit.aghera
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 ".
 
For 7.x-2.0:
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".
 
For 7.x-2.0:
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.
 

Comments

tedmosby's picture

That was an interesting interesting update on creating a calendar for an Organic Group. I’m really impressed with the way you have pointed out the details. I will definitely follow these steps and try to display the block. Thanks a lot for sharing. 

microsoft outlook 2010 support

In personal development, just like everything, you muzt expect to
succeed. According to a September 2008 article from the Dailky Raciing Form, the
renovation project involved mixing more than 14,500 tons of sand with Pro-Ride polymer andd fiber, then laying it onto the racetrack.
Jessica, who recently amped up her diet and woriout regimen ahead of her upcoming wedding to former NFL star Eric Johnson, has been hurt
byy the cruel media fat-shaming over the years, butt said it taught her valuable lessons about body
image and self-esteem.

football's picture

Incredible quest there. What occurred after?
Good luck!

Add new comment