Closed (won't fix)
Project:
Organic Groups Menu (OG Menu)
Version:
7.x-3.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
25 Jul 2012 at 20:17 UTC
Updated:
3 Jul 2014 at 17:27 UTC
Jump to comment: Most recent
Comments
Comment #1
rv0 commentedThere's some ways with custom code to provide the context where needed.
Use og_context()
http://drupalcontrib.org/api/drupal/contributions!og!og_context!og_conte...
But these seems a bit to specific and maybe out of the scope of this module
e.g. what would happen when multiple groups are given as context
Setting to won't fix for now.
Comment #2
johnnymowmow commentedI'm dealing with the same problem. However, my views automatically include the name of the group in the URL. So, for example I have view for 'News' for 'Group1' - the url would be site.com/group1/news.
OG Menu shows on site.com/group1 and site.com/group1/news/node but not on the news view page.
Is it possible to render the OG Menu using the Group name as a variable? Or is there another recommended solution for displaying the OG Menu based on url within a view?
Comment #3
flaminhoon commentedI need this functionality too please. Where could I put your block of code zipymonkey?
Comment #4
rv0 commentedThis is not an issue with OG Menu.
Organic Groups should have a way of setting the context on views pages.
There are some issues there:
#1043840: Allow modules/pages/views/etc. to set a group context
#1781386: Context only set on primary node view page, nothing else
Check the snippet on #15 in the last one.
Comment #5
jaydarnellAs rv0 suggested in #1 - I used a php snippet in the footer of my view to set the og context based on the group entity ID passed into the view.
My snippet looks like this:
Where !1 == OG membership: Group ID input (contextual filter) - If anyone else hits this snag and needs a more detailed description of what I did please let me know and I'll be happy to share.