Primary

Blocks

Groups provides blocks which you can use to show content based on memberships. These blocks help you to make sections of content visible to group members only. They can also be used to hide certain sections from group members.

  • The Groups Member block reveals its content to group members.
  • The Groups Non-member block hides its content from group members.

The Groups Member block and the Groups Non-member block restrict access to the content they enclose. You can use them to protect simple or complex block compositions. They can contain any number of arbitrary blocks and can also be nested.

Groups Member Block

This block shows its content to group members. When you use this block, you will select one or more groups for it so that the block’s content is visible to them.

Here is an example where the block simply contains a paragraph of text and is restricted to registered users. We just have to select the Registered group in the block’s settings.

Groups Non-member Block

This block allows to hide its content from group members. As with the previous one, you are going to select one or more groups for it and it will hide its content from the members of those groups.

Let’s look at a simple example for this block. Here we show a paragraph of text to those users who are not registered or logged in. For this, we simply selected the Registered group in the block’s settings.

The documentation on Content Sections provides additional examples and information on the use of these blocks.