[Drupal] How to configure organic groups in Drupal
Organic groups module (og module) enables users to create their own groups and manage these groups. The Organic Groups module, provides user the ability to create, manage, and delete their own 'groups' on a site. Each group can have members, and maintains a group home page which individual group members may post into.Group membership can be open, closed or moderated.
A group entity is the parent for all the things that belong to a group. Users and content are the two kinds of entities that can belong to a group. Each piece of content and each user is connected to the group with an additional entity. The entity is a special OG membership entity that links users and content to their associated group.It is simply a record in a table that tracks which entities belong to which groups.
Modules required
- Organic Groups modules
- CTools
- Entity API
- Entity reference
- Views Bulk Operations
Configuration
Install Drupal organic groups module and follow the steps click to set up organic group.
To add the special Organic Groups fields, we need to go to the Organic Groups administration section. Home » Administration » Configuration » Organic groups » Organic Groups field settings. To add the special Organic Groups fields, we need to go to the Organic Groups administration section. Home » Administration » Configuration » Organic groups » Organic Groups field settings. Select an entity/bundle and then choose the fields that need to be added to it . The available fields are sub-divided by group and group content, to indicate which fields can be added to the group entity and which belong on the group content entities. To add a field to a content type select the content type in the top and the field in the bottom and click on Add field.
- Group Audience :Group Audience field will keep track of which groups a user belongs to.
- Group Visibility :If we want to have the possibility of private groups, we can add the Group Visibility field to the group.
- Group roles and permissions : If we want to have per-group permissions that override the global roles and permissions we can add the Group roles and permissions field to the group entity type.
The group content entities get different fields. They need a Group audience field and perhaps a Group visibility field (to let authors choose if the content is publicly visible). Users entity gets the same Group audience field that group content gets. This is the field that will keep track of which groups a user belongs to. When the fields are all set up, you can select an entity and see which fields have been assigned to it.