hi,
i would like to create a primary menu item for each subscribed group: for example in primary menu, there will be an item called my groups, and under it there will be list of my all groups. could you recommend a way to achive this? i'm investigating menu_hook but maybe there's a better and simpler way to do that..

thanks for help..

Comments

mgok01’s picture

ok I found another solution..
I modified the page.tpl.php file, and I added following code ( taken from http://drupal.org/node/141522) in the "primary menu" section..

<?php $profile = $user;
global $user;
if($groups = $profile->og_groups) : ?>

<?php
    foreach($groups as $group){
    $tmp_node = node_load($group['nid']);
    if(node_access('view', $tmp_node))
      print  l($group[title], 'node/'.$group[nid]) . '</li>';
    unset($tmp_node);
    }

?>
<?php endif; ?>