Closed (won't fix)
Project:
Organic Groups Menu (OG Menu)
Version:
6.x-2.0
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
3 Dec 2009 at 11:39 UTC
Updated:
23 Aug 2010 at 09:53 UTC
I've been trying to get this module to work with the og_forum module and found that I had to hack the code slightly to stop the og menu block disappearing when clicking on the link for the group's forum. My hack probably isn't good enough to go into the module as a patch, but I thought I would share it back in case anybody else finds it useful.
In the function _og_menu_get_menu_block() I have added a few lines to get a value for $nid when in a forum. Under the lines:
<?php
// get current node
if (arg(0) == 'node') {
$nid = arg(1);
}
?>
I've added:
<?php
else if (arg(0) == 'forum') {
$currentGroup = og_get_group_context();
$nid = $currentGroup->nid;
}
?>
I've found OG Menu to be a really useful module so thanks to everyone who has been working on it.
Comments
Comment #1
liamgh commentedThis patch doesn't seem to be necessary with 6.x-2.0 which is great news, so I will close this bug.
Comment #2
muschpusch commentedSorry liamgh similar issue in og_menu 2.0
At the last condition of the IF statement as a fix...
Comment #3
jide commentedI do not really get the issue described by muschpusch. Reopen the issue if needed.