Hi Jim,

Any ideas how to change tabs to menus items? it would be great to use superfish.module.

Thanks,

Jim

CommentFileSizeAuthor
#6 og_panels_hide_tab-6.x-1.x.tgz542 bytesñull

Comments

jimthunderbird’s picture

Hi Jim,
I made it working through a custom php block calling the superfish theming api. Please remind that my solution is more of an experimental way but not a scalable solution yet.

Here's the steps:
1. Go to admin/build/menu, add a new menu, let's say testgroupmenu
2. Create the first item, which is the target organic group node that you have, let's say it has an id of 10, we type in node/10 as the link and type in Home as the title.
3. Create the second item, which is the og panels page that belongs to this group, let's say it is node/10/about, add that to testgroupmenu and make its parent pointing to the first item.
4. Create the third item, repeat step 3, keep adding the og panels you want
5. After all the og panels has been added to our testgroupmenu, we will have a menu tree structure looks like:
Home
test
about
contact
...
6. Create a custom php block, with the php code:

  <?php
    $superfish = theme_superfish(1, 'menu-testgroupmenu', 0);
    print $superfish['content'];
  

Place this block in your og panels page and then you will see it styled with superfish module.

This is just a rough idea. I will figure out a better solution later on.

Best Regards,
Jim

jimthunderbird’s picture

Hi Jim,
I made it working through a custom php block calling the superfish theming api. Please remind that my solution is more of an experimental way but not a scalable solution yet.

Here's the steps:
1. Go to admin/build/menu, add a new menu, let's say testgroupmenu
2. Create the first item, which is the target organic group node that you have, let's say it has an id of 10, we type in node/10 as the link and type in Home as the title.
3. Create the second item, which is the og panels page that belongs to this group, let's say it is node/10/about, add that to testgroupmenu and make its parent pointing to the first item.
4. Create the third item, repeat step 3, keep adding the og panels you want
5. After all the og panels has been added to our testgroupmenu, we will have a menu tree structure looks like:
Home
test
about
contact
...
6. Create a custom php block, with the php code:

  <?php
    $superfish = theme_superfish(1, 'menu-testgroupmenu', 0);
    print $superfish['content'];
  

Place this block in your og panels page and then you will see it styled with superfish module.

This is just a rough idea. I will figure out a better solution later on.

Best Regards,
Jim

jwilde’s picture

Hi Jim,

Thank you for your speedy reply - i am grateful for your help. I've already done what you've suggested, the problem is that I still have the tabs displaying from og panels. So, on the og panels page, it displays both the suckerfish menu and the og panels tabs. I need to get rid of the tabs, except for the "view/edit". I tried using the tab tamer module but it causes problems on on content types (it wipes out the edit/views tabs.)

Kind regards,

Jim

jimthunderbird’s picture

Hi Jim,
You can do this by writing a custom module implementing hook_menu_alter. Create a custom module, let's say og_panels_hide_tab, in og_panels_hide_tab.module, create a function

function og_panels_hide_tab_menu_alter(&$items){
  $result = db_query("SELECT DISTINCT tab_num FROM {og_panels} ORDER BY tab_num ASC");
  while ($tab = db_fetch_object($result)) {
     $items['node/%/og-panel/'. $tab->tab_num]['type'] = MENU_CALLBACK;
  }
}

Basically what it does is to change all og panels related menu items to MENU_CALLBACK, this way they will be hidden but still accessible.

It's kind of hackish, maybe for the next release of og_panels module, we can have a feature like turn on/off tabs.

Hope this helps your case for now.

Best Regards,
Jim

ñull’s picture

+1

Very interested that this feature gets included. I work with og_menu and prefer that way of navigation within a group.

ñull’s picture

StatusFileSize
new542 bytes

In the meanwhile if somebody needs this I attached the module to save you some time.

majdi’s picture

im trying to do this but still no luck , if we could keep tabs, and make another custom module that makes normal menu item and add it to the menu that already og_menu added, still working on this in case I did it i will past the solution here