Closed (fixed)
Project:
User Relationships
Version:
6.x-1.0-rc3
Component:
User interface
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
19 Dec 2009 at 18:39 UTC
Updated:
19 Jan 2012 at 17:18 UTC
Hi all,
I want to ask if someone has tried to hide the "All" tab from the relationships page (nav menu > My relationships) .
I have only one of relationship type the "Friend" type. So the first tab (All ) gives the same result with the third tab (Friends) . The second tab (Pending Requests) works fine and i want to keep it.
I tried to find any option from User Relationships admin pages but i did'n find anything. I also tried to find any view with page path relationships and nothing....
How can I remove the first tab and leave the two others?
Thanks in advance.
| Comment | File | Size | Author |
|---|---|---|---|
| relationships.JPG | 11.8 KB | aleada |
Comments
Comment #1
alex.k commentedYou need to implement a small hook_menu_alter function http://api.drupal.org/api/function/hook_menu_alter/6 in order to disable the "All" tab.
Comment #2
aleada commentedDo you mean that something like
should be placed inside my template.php ?
Comment #3
aleada commentedWhere is the place that i can place the hook menu alter function?
I searched all the files of the user relationships module but I did not find how to remove the first tab (All relationships) from view.
Comment #4
aleada commentedHi again,
Can someone help me to solve my problem with the all tab on My Relationships page?
I want also to hide the elaboration message from the table list of my friends. I believe tha the elaboration message is usefull only once, before someome become friend to another. After request acceptance it is not very nice to display the initial elaboration message on My Relationships page.
Regards
Alex
Comment #5
aleada commentedOk i found the answer .. It has to do with the template.php
http://drupal.org/node/68792
Comment #6
rburgundy commented@amatech - can you please share the code you place into template.php
thank you
Comment #7
aleada commentedBe sure that you have replaced the yourtemplatename prefix on the two functions with your template name and that you have cleared all caches to see the changes.
The drupal_rebuild_theme_registry() I am not sure it is working and how affects the theme registry.
If you have any question feel free to contact me.
Comment #8
rburgundy commentedthank you amatech!
I will try with your instructions above.
Comment #9
igorik commentedit works for me, but it destroy rest two tabs (only links are shown instead tabs)
Comment #10
mrf commentedigorik, if you are having issues with additional tabs not showing up I'd do some print_r's near:
And make sure that other tabs aren't being selected by this statement.
Comment #12
pitxels commentedI think this is something should be done in the logic side, not on the theme.
It is not about the aesthetic of the page having an extra word, Its about the usability.
If there is only one relationship available, this page should be different.
Lets say the only relationship is friends
The title should be "My Friends" instead of "My relationships"
"No Friends found" instead of "No relationships found"
Then we will have 2 Tabs: Friends and Friend Requests
Just my opinion. great module :)
Comment #13
pitxels commentedComment #14
mrf commentedHi pitxels,
Thanks for the feedback and I definitely agree this could be cleaned up.
This issue was a specific request on how to do this on your own, if you think this needs to be fixed / cleaned up I'd open up a feature request against 7.x First check to make sure that this isn't already in place, as a lot of changes have already made it into the ui for 7.
Any new feature that is sufficiently popular and well defined for 7 might get moved back to the 6.x branch but right now all new feature development is happening for 7.