Add option to remove "View" and "Talk" tabs under node title

poakpong - April 25, 2009 - 18:03
Project:Talk
Version:6.x-1.x-dev
Component:Miscellaneous
Category:feature request
Priority:normal
Assigned:Unassigned
Status:needs review
Description

Please suggest!

1. How to remove "View, Talk" tab under node, also use link "Add new comment" or "Talk page (1 comment)" (meta area in bottom of node) for go to Talk page?
(talk-remove-tab-1.png)

2. How to click on node title on Talk page for go back to Node page?
(talk-remove-tab-2.png)

Thank.

AttachmentSize
talk-remove-tab-1.png45.67 KB
talk-remove-tab-2.png39.15 KB

#1

Todd Nienkerk - June 30, 2009 - 21:34
Title:Request to remove "View, Talk" tabs under node title» Add option to remove "View" and "Talk" tabs under node title

+1. Displaying a talk tab could simply be one of two (or more) display options. There could also be a "back to node" link on the talk page.

#2

greggles - July 6, 2009 - 01:10

It's actually a bit of a problem to try to remove the tab :(

If we use MENU_CALLBACK as the menu type then the tab disappears, but when you go to node/NID/talk *all* of the tabs disappear because Drupal forgets where you are relative to the other menu items. If we could figure out a way keep those tabs, I think this could be a good solution.

If you just use an empty "title" value for the menu callback as a local task, then it displays as empty which helps to diminish the display, but frankly it just looks silly/ugly. On some browsers having an empty string as the link disappears (safari) but I don't think we should rely on that, exactly...

I'm not sure of a good way to fix this.

AttachmentSize
missing_tab-1.jpg 115.45 KB

#3

greggles - August 18, 2009 - 15:37
Status:active» needs review

After working on the access check I had a crazy idea on how to do this.

Attached patch makes it work, but it _does_ show the talk tab when on the "node/NID/talk" page. Does that still seem valuable? The reason it has to show the tab on that page is because of the results of the research in comment #2.

AttachmentSize
444894_3_hide_tab_on_non_talk_page.patch 1.79 KB
 
 

Drupal is a registered trademark of Dries Buytaert.