Group 7.x-1.x

The Group module for Drupal 7 is based around the Entity API. Individual groups have a "Group Type" in the module, which is an Entity. Since it's an Entity, it has fields.

It also has specific permissions and roles, which apply to any Group of this Group type.

Group 8.x-1.x

Placeholder page for the Group (version 8) documentation, about anything that does not apply to the 7.x version of the Group module.

Note: refer to Additional resources for a link to a video that demonstrates how to use the Group module.

Custom entities as group content

To allow your custom entity to be added to a group, you must expose it as a GroupContentEnabler plugin.

e.g.

Macros in Twig Templates

From the official Twig documentation: "Macros are comparable with functions in regular programming languages. They are useful to put often used HTML idioms into reusable elements to not repeat yourself."

In Drupal 8 a macro is used to create eg. the main navigation (see the menu.html.twig file).

Drupal Open Curriculum Initiative

Objective

The objective of this initiative is to create an Open Curriculum for new developers to come into Drupal and get trained in the various aspects of Drupal development. The curriculum is aimed at helping Drupal companies train new recruits in Drupal in a systematic and structured manner. The training is expected to happen through in-class sessions, self-learning, training exercises and finally on-the-job learning. The open curriculum is expected to be a framework that will allow the developers to build an understanding of the technology and then fill in details as they go through the process of training and working on projects. See more at https://groups.drupal.org/node/508323

Drupal8: HOWTO detect whether an entity reference field is a taxonomy term reference and flag it for targeting in field.html.twig and your CSS

Now that the Taxonomy term reference field has been removed in favor of Entity reference it begs the question how one is supposed to specifically target taxonomy term reference fields in Twig templates and in your CSS.

The following (which currently involves checking for the existence of a particular method) may not be very pretty, but it works.

In your THEME.theme:

How to hide group settings on node edit forms

If you want to control how group members create and interact with group content through other means than the group settings on the node edit form (or just allow admin users to change what group content is in), it can be useful to hide that setting. One way to do this is to create a custom module and use this code that hides the form for all users except those with role id 5 (replace HOOK with your module name):

Pages

Subscribe with RSS Subscribe to RSS - Designers/themers