6

I've got two groups. I've got two forums belonging to each group. I've got a panel set up to display a custom view of forum topics that are defaulted to the group id, so that when given the group id arg in the url it shows the forum topics that belong to that group.

The problem is, I now want a menu item on each group page which says 'forum' which points to the forum view with a group id argument which causes the display of only related forum topics.

1

You do this with contextual filters. In the forum view, under the advanced settings, go to relationships and add OG membership: OG membership from Node. Then add a contextual filter OG membership: OG group gid. You will also need a default argument for "When the filter value is not in the url". You will use "Current OG group from context" for that. Rearrange your contextual filters if necessary so that is the first one.

Then in your page settings, set the path to group/%/forum (or whatever the correct path to your group page is). The % will be expanded to the group id, so that group/1/forum will show you the forum view for the group with gid=1.

You can then set the menu option just below the path option. That will put the menu on any page in the path you set.

Give that a try.

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.