Group
The Group project provides bridge modules to integrate a Drupal website with the Group service.
Table of contents
Drupal projects discussed in this chapter: Group.
Introduction
Out of the box, Drupal only allows a person to view, create or edit the different content types you create. However, you might want to be able to let them view or edit all content types, but only in a specific section of the site.
The Group module allows you to create arbitrary collections of your content and users on your site and grant access control permissions on those collections.
Out of the box, Drupal only allows a person to view, create or edit the different content types you create. However, you might want to be able to let them view or edit all content types, but only in a specific section of the site.
Installing and enabling the module
Install as you would normally install a contributed Drupal module. See: Installing modules in the community documentation for further information.
Install with composer and enble both Group and Group Node:
$ composer require 'drupal/group:^1.4' $ drush en group $ drush en gnode
Documentation:
Configuration
Setting up a group
One key thing to know about Group is that it has a group type feature. This is very similar to the relationship between content types and nodes.
Create a Group Type
Much like Content types, we can add fields, and control their display. For my example, I will add:
- A description field
- An image field for the logo.
- An entity reference field for a taxonomy.
Navigate to
and click "+ Add group type". Name it "Association.As with content types, you can create fields for the group types. For example, you could use these fields to create a profile of each team with its logo, location and more.
Group Type Display
Connect the group types to content:
Now we're going to connect our groups to content types. This will allow us to use the Group module for extra permissions. In this example, I'm going to connect the Article content type to the group.
From the Group Types page, go to the "Manage fields" dropdown and choose "Set available content":Final word
Due to limitations of the core DateTime module these are not yet implemented in core. See the linkd issues for details:
- Optional end date support [#2794481]
- Repeating date support [#2775249]
Last update: 2022-03-30 [gh].