Is there any way to put Contact (tab) menu on Primary Links?

Thank you.

Comments

vm’s picture

Assigned: darsic » Unassigned
Priority: Critical » Normal
Status: Active » Fixed

use the path to the og_contact page in your primary menus links in administer -> menus

darsic’s picture

Thank you for quick answer.

I tried that (node/%/contact). Problem is that system reports that path is invalid.
I want this menu item to be dynamic as it is on tab menu.

If i add static path (node/25/contact) for one group, i will have to add this for every new og group.

I hope that you understand me :)

Thank you.

darsic’s picture

What you think about idea to make page with code snippet and link?

Code would make redirection on contact page based on user group.

Is this easy way?

vm’s picture

Status: Fixed » Active

remarking as active.

I don't know how you will add an argument to the menu item

darsic’s picture

me too :(

gnat’s picture

I think that the only way to do this type of thing is from within the module itself. I'm hesitant to add this in, as I don't really want to bloat this module much further.

However this could also be handled from within a custom module using hook_menu. There's likely no way to determine an argument dynamically through the admin interface, so you would have some piece of interpreted code running this. You can look at the module (near line 105 of og_contact.module ), for how I am doing the current menu setup for the tabs.

If you can come up with a reasonable patch to accomplish this within OG Contact itself, I would be happy to review, and possibly add it.

darsic’s picture

Thank you for response.

Few days ago, i printed complete code of your og contact module. I found line in code that make this menu item as tab.
I tried to change this menu item to apper in administration section of this module, so i can change from menu ui tu appear on primary links.
I done some testing with MENU_NORMAL_ITEM instead of MENU_LOCAL_ITEM, but nothing happen.

I will try what you recommend.

gnat’s picture

Have you cleared you menu cache?

darsic’s picture

Yes. I done that after every code change.

gnat’s picture

Status: Active » Closed (fixed)

I am going to close this due to lack of activity, but please reopen it if you still would like some help with this issue.