Hi,

it would be great, if there is a variable like is_member available in twig for a more individual theming.

Comments

dercheffe created an issue.

Anonymous’s picture

Subscribe.

sacha05’s picture

The way I implemented this is:

Create a function in a module that performs the checks you need (i.e. is user member of a group, has a role, etc).

function hook_preprocess_group(&$variables){
// do your logic checks here
$variables['group']->is_member = "yes";
}

By returning that logic check value to $variables['group'], it becomes available in your twig template: {{ group.is_member }}