Drupal is a registered trademark of Dries Buytaert
INTRODUCTION

This module will act on content form on these content types that are enabled as group content. It will help when, in the same content there are fields referencing to other contents that are also group content, and is wanted that these references to be related to the same groups.

For example a Group is used as course, and this course has chapters and resources content. Chapters have references to resources that could be created through inline entity form. When creating a chapter in course scope, previously , one need to create first the resources, and relate these to the course group. This module will help there acting after the chapter is saved, will try to relate each resource to the chapter course group.

It will use the postSave method in a computed field type which has a widget to choose the default behavior: relate referenced entities or not.

By default will be disabled if not using the form widget to set the behavior.

REQUIREMENTS

This module requires the core 'Group' module: https://www.drupal.org/project/group

You must also install one or more "Group relation type" modules (e.g. 'gnode' from the Group core project).

INSTALLATION

Install the Group relationship inheritance module as you would normally install a contributed Drupal module. Visit https://www.drupal.org/node/1897420 for further information.

CONFIGURATION

Initial group configuration

In order for this module to do anything, you must first configure your site to have group types and create one or more groups. Users can automatically be associated with groups, but if you wish to associate other entity types with groups you must configure a group relation type manually. For example:

  • Enable the 'gnode' module from Group core.
  • Create a group type at /admin/group/types (e.g. 'Private group').
  • Click on the 'Set available content' operation (/admin/group/types/manage/private_group/content).
  • Scroll down to a node type you care about (e.g. 'Article')
  • Click the 'Install' button and configure appropriately.

Example: Article nodes

For example, if you have a node type called 'Article' that can belong to groups (see above), you could do something like this:

  • Visit Admin > Structure > Content types (/admin/structure/types)
  • Click on the 'Manage display' operation next to the 'Article' node type (/admin/structure/types/manage/article/display)
  • The 'Groups' computed field provided by this module is disabled by default.
  • Drag it up into the enabled fields you wish to see on your Article nodes.
  • Select the appropriate format in the select list.
  • Optionally click the gear icon to further configure the formatter.
  • Click 'Save' at the bottom of the form.

You can repeat these steps for as many display modes as you need.

Example: Article nodes

For example, if you have a node type called 'Article' that can belong to groups (see above), you could do something like this:

  • Visit Admin > Structure > Content types (/admin/structure/types)
  • Click on the 'Manage form display' operation next to the 'Article' node type (/admin/structure/types/manage/article/form-display)
  • The 'Set group to referenced entities' computed field provided by this module is disabled by default.
  • Drag it up into the enabled fields you wish to see on your Article nodes.
  • Select the appropriate widget in the select list.
  • Optionally click the gear icon to further configure the widget behavior.
  • Click 'Save' at the bottom of the form.

Field labels

By default, the computed field uses the label 'Groups'. If you need to customize these labels and/or add descriptions for these computed fields, you can install and enable the 'Base Field Override UI' contributed module:

https://www.drupal.org/project/base_field_override_ui

Activity

Total releases
1
First release
Apr 2025
Latest release
11 months ago
Release cadence
Stability
0% stable

Releases

Version Type Release date
1.0.0-alpha1 Pre-release Apr 1, 2025