Submitted by admin on Mon, 01/11/2021 - 19:39

In Drupal 8, we have implemented a membership-type website that will control and display views or lists of contents according to a member's membership group. The Drupal Group module seems to be the most ideal solution https://www.drupal.org/project/group.
Normally, in this scenario, one will set up the group module, content types, permissions, etc. like described below:
- Setup the usual Group Types, IDS, and permissions
- Managed to make the authoring, viewing permissions work thru usual Group Module settings and configurations
- Managed also to complete the other permissions of each Member or moderator being able to add, delete members and contents
However, we seem to find documentation lacking in setting up the following requirements:
- Create in Views a list of Group Content nodes that will display in a sidebar
- List of nodes will only display group content of member logged-in and currently viewing the page
- List of nodes will dynamically be displayed according to which member is logged-in, depending on his/her group membership currently logged-in and viewing
To quickly set-up a functional, dynamic block of node contents:
- Create a View, with page and block
- Choose any filters and formats as needed
- Under Advanced > Relationships > Choose Content group content
- Filter by plugin > whichever content type will be displayed and filtered
- Require this relationship, which enables hiding items that do not contain this relationship
Other, related, useful references that might help further:
Leave a Comment