[Drupal] How to set up an organic group in drupal 7?

| | 2 min read

Drupal 7's version of Organic group is totally rewritten by taking the advantage of many new Drupal 7 features, especially entity and field APIs. One of the major difference between drupal OG-6 and OG-7 is the expansion of the concept of what a 'group' is. In Drupal 7, any type of entity can be a group and any type of entity can belong to a group. The organic groups module allows us to create a working group where a number of people can create content which is non-public and it is visible to group members only. In this article we are going to address the issue how to set up an organic group in drupal 7.

Dependencies

  1. Organic Groups modules
  2. CTools
  3. Entity API
  4. Entity reference
  5. Views Bulk Operations

Enable "Organic Groups", "Organic Groups Context", "Organic Groups Register" and "Organic Groups UI". After that, follow the below steps:

Step1 : Create a Group node

  • To create a basic "Group node", create a new content type called "Group Node" by navigating to Structure -> Content Types -> Add Content Type.
  • In the Organic Groups settings area, assign this content type to "Group Node" and save.
  • You can decide if your group should be listed on the 'groups' homepage. Modify other settings as you wish and Save Content Type

The reason behind why we are creating a content type is because Organic group requires a lot of flexibility which content types prvides, as they allows different types of group types.

Step2 : Create a Group post

  • To create a "Group post", create a new content type called "Group Post" by navigating to Structure -> Content Types -> Add Content Type.
  • Under tab "Group", the "Group" radio button should remain "Not a group type", and the "Group Content" should be "Group Content Type".
  • You can select the group audience among you groups. Modify other settings as you wish and Save Content Type

This is the basic setup of Organic Groups. Every user can now create a group if they have the permissions to create content of those content types.