2

How do you create a View showing all the child groups of a group in Organic Groups?

I've started off with the 'OG Extras Groups' view, which shows all groups. I thought it'd be simple to then just add a filter for 'Content: Parent group', and that would show the children of a selected group. It returns no results, though.

I've tried all sorts of relationships but can't get the child groups to show. This thread is the only information I've found: https://www.drupal.org/node/159988. The explanation is for D6, though, and I can't see an easy translation to D7.

I've only got five groups so I don't need to set a contextual filter - I can hard code the parent group value (either name or ID).

1

Answering my own question: it was as simple as adding the 'Content: Parent group' filter. For some reason I'd added a relationship I didn't need, which I was using on the filter. In fact you don't need any relationships at all. You can delete the 'OG membership: OG membership from Node' relationship from the default 'OG Extras Groups' view.

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.