Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hi,
i'm working on a project using search_api and organic group. I'm having trouble to configure a view with a search index that filter content the user can see.
- My view is using a display of fields of a certain entity type
- Each entity is attached through organic group to a group or several
- Each user has one or several groups
My problem is that i can't see how to link every organic group of the user to the view and make it filter on this groups.
May i have some help please ?
Adrien.
Comments
Comment #1
adripop CreditAttribution: adripop commentedComment #2
Ludo.RI've just done it, you need to index the "Groups audience" field (
og_group_ref
by default) to your search index.Then in the view:
But then you will only get results that are in the user's groups. No more "free" content.
That's a problem for me.