1

I'm trying to display on a views, only the nodes which the user is part of the Organic group.

I have a field og_group_ref in my content type which relate to a group.

What I want is for each user, display only the one he his part of. It seems relationship is the trick but somehow I can't make it work .

So far I tried in Relationship:

 OG membership: OG membership from Node group 

(OG membership from node group) OG membership: User from OG    membership

and to add in contextual filter:

(user from OG membership) User: Uid (with default value set to "user id from logged in user")

But it doesn't seem to work!

2

You just need to add OG membership: Group ID as a contextual filter,
click Provide Default: The OG groups of the logged in user
and under More at the bottom of the filter's settings,
click Allow multiple values.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.