I'm in the process of building a site that uses the"Spaces OG module, and want to be able to use OG Menus in the two dozen or so OG-based spaces we'll have.
I've created the menus for each group, and can get them to appear on standard group posts -- and even when editing the group node itself. But when actually viewing the group node -- which Spaces OG essentially replaces -- the menu doesn't display.
Can you please point me to the "trigger" or hook that tells this module to display the OG Menu? The "homepage" that Spaces OG creates for each group is closely linked to the group node -- the spaces_get_space() function will pull group node's NID, content type, and various og_ data points -- but I can't tell from looking at the OG Menu module code what signal a group node sends that Spaces OG does not.
Thanks in advance for any tips.
Comments
Comment #1
TKS commentedOK, so the function I was looking for is _og_menu_get_menu_block().
On line 423 of og_menu.module, there's this:
... and then the $nid is used to pull in the OG Menu for the appropriate group.
If I add something like this:
I can use the path of the Spaces_OG homepage, and then us spaces_get_space() to extract the $nid I need.
So problem solved, I guess -- but in an ugly, poorly coded, hack sort of way. Any suggestions on better approaches?
Thanks again.
Comment #2
socialnicheguru commentedwill try this out :)
Chris
Comment #3
RoboPhred commentedTry skipping the arg() nonsense and use menu_get_object(), that should return the node being viewed.
http://api.drupal.org/api/function/menu_get_object
Comment #4
jide commentedClosing old 1.x issues.