Hi,

I want to create a custom menu for every organic group on my Drupal environment.

Ideally, the custom menu would show up on every node associated with this group.

Any suggestions or pointers to descriptions on how to achieve this (e.g. via the gid)?

Best regards,

Olivier

Comments

Anonymous’s picture

I am also very interested in this - I don't need a specific menu for the group, but I want the heading of node and teaser to show an icon for the group the node belongs to (especially on the front page)...

deadman’s picture

I'm also looking for this function. (sorry can't offer any pointers - I've been trying to set up something similar to TfR75 for about a week now with no success!)

Anonymous’s picture

I have just found a solution (for details see http://drupal.org/node/150911):

<?php
foreach( (array)$node->og_groups as $group ) {
switch ( $group ) {
case 37:
   print "Group 37";
   break;

case 38:
   print "Group 38";
   break;

default:
   print "Unknown group or Not in a group";
   break;
}
}
?>
deadman’s picture

that looks excellent, thanks for the heads-up :)

Anonymous’s picture

Status: Active » Fixed
Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.