How to Use the Drupal Group Module
Group is an extremely powerful Drupal 8 module that allows you to create groups of users with shared content and permissions.
It’s easy to see why this module has replaced Organic Groups, and become the default choice for social sites in Drupal 8.
In this tutorial, I’m going to explain how you can use the new Group module to organize your site’s users.
Step #1. Setting up Groups
Here’s how to get started:
- Download and enable the Group module. Enable all 3 submodules.
- You will see a message asking you to rebuild the permissions because Group does change the way that the permissions work. Click this link and rebuild the permissions (You will actually see this many times as you configure the Group module. It’s not necessary to rebuild permissions every time, however you should when you’re configuration is finished).
Now we can start to set up our groups. 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.
- Click the Groups icon in the admin menu.
- Select the Group types tab:
In this example, we’re going to be building a news site with different editor levels. We will be making one group for each team.
- Click “Add group type” and set up the groups, as in the image below:
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.
Step #2. 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 Basic Pages content type to our groups.
- From the Group Types page, go to the “Manage fields” dropdown and choose “Set available content”:
- Click “Install” for “Group node (Basic page)”.
- You will now see a confirmation screen. Click “Install plugin”.
Step #3. Add the groups
Now we can start to add the groups.
- Go to Groups > Add group
- Choose one of the group types you have set up.
- Give the group a name. In this case, I’ll call the group “Basic Page Writers”.
- Save the page and this will take you to the group summary page. From here you can view the group’s details, members, and content.
From this page, you can add some members to test the groups:
- Click the “Members” tab.
- Click “Add member”.
- You can now add existing users to this group:
You can also add some content from this main group page.
- Click the “Node” tab.
- Because we choose “Group node (Basic page)” in Step 2, you can now add basic page content to this group by clicking “Create node”.
Find out more:
Check out our NEW class on Drupal 8 Groups!
Summary
We’ve only just scratched the surface of the Group module in this tutorial. It’s already one of the best modules I’ve seen for Drupal 8 and it’s clearly a very strong option for anyone wanting group functionality. If you have any requests for further Group tutorials, please let us know in the comments.
I’d love for you to explain this in more detail: “It’s easy to imagine that this module will replace Organic Groups”. We’ve been using OG for a while now, and it seems to me like Groups atm is a subset of what OG can do, but it’s a lot simpler to use. Am I correct, or am I missing something/a lot?
Hi Dieter,
OG I have always found a bit over the top. Using Group you can do the same jobs it has a lot of options but everything to me is more intuitive. And by using it to just connect content types even if you remove Group it won’t break your site. What area do you want more information on ?
Thanks
Daniel
Your answer is the high-level answer I was looking for. What I’d need next is a side-by-side comparison so i’ll go looking for that.
Thanks!
Since “Group” for Drupal 8 is in Beta – just curious if there would be a chance you could consider a Drupal 7 example for you detailed example?
Hi Coco,
A lot of people use OG for Drupal 7 you might want to give this a read [url=https://www.ostraining.com/blog/drupal/organic-groups/]https://www.ostraining.com/…[/url]
Thanks
Daniel
Not interested in using OG at all since deleting a group breaks the site and creates all kinds of problems. Simply not an option. There should be more documentation and/or help for using this Group Module on a Drupal 7 install.
I agree with you Coco. I use Drupal 7 and do not want to use OG. I want to use the Drupal 7 version of the groups module since that would be easier to port over to Drupal 8 when it comes time to upgrade the entire thing. Problem as you mention is that there are almost no tutorials on how to use the Group module on a Drupal 7 site and they are significantly different to use. Having this type of tutorial or step by step process for a Drupal 7 install would be great. Not everyone uses OG, and if many use OG it might be due to the total lack of Group documentation or guides for a Drupal 7 install. If these were more available, i can see how many would choose Group over OG anytime, even on Drupal 7.
Is their any way i can assign group roles to thee members who joins the group automatically.
Is there a way to add a custom tab to the Group tabs in the D7 version?
Can we create Sub groups under Groups with this module?
Use Case : Create and set permission
University -> College->Departments
(Create colleges & departs)
Looking for help with installing enabling Group module on Drupal 8.1.
Check boxes for enabling module are disabled.
Hi Frank,
Drupal 8.1 is REALLY old – you should definitely update to the latest (8.8.3 as I’m writing).
There are a few dependencies for Group – Options Field Text Filter User System Entity (disabled) but nothing that should stop you from installing it.
Is Update Manager enabled (under Core).
Otherwise I’m guessing it’s just not compatible with 8.1 ? Hard to know without more information.
Hi, we are migrating from D7 to D8 (clean install with new content, no data migration). We’ve been using Content Access in D7 to control user/role/group permissions. Just wondering how Group is compaired to Content Access, and was wondering we should switch. Pro vs Con etc. Thanks!
Hi,
Can anyone tell me if Groups is fully compatible with Drupal 9 yet? I was able to install The Group module but the only submodule that I can see is Group Node.
Hi Caitlin,
So the group module is compatible, but some of the supporting modules may not be. Take a look at [url=https://www.drupal.org/project/group/ecosystem]THIS LINK[/url]. Most of these submodules are NOT compatible with D9.
i can see only group and group node in drupal 9.0.7, and that too cannot enable it. please help me