I've been searching but can't seem to find a solution to my problem. I want to COMPLETELY remove the view tabs that appear when someone searches for a term. I found template.php overrides to remove certain tabs, and I managed to remove everything. But then I am left with the two lines and spacing associated with the tabs. So the tab wrapper is there, but the tabs themselves don't appear.

I could remove them via CSS (by using display: hidden;) but that would mean that they're still loading, which is bad practice. But also, I couldn't do it because there isn't a class for that particular set of tabs. Any attributes I associate with that class, will be applied to all of the instances of the tabs across the entire website.

I've also tried creating my own customsite module, but it has been ineffective.

Once I find a way to remove the tab wrapper, I'll apply it to several pages, mainly the search results and the user profiles. Thank you all very much.

Comments

matt v.’s picture

The Tab Tamer module should be able to help with that.

tarekshalaby’s picture

Thanks a lot. Tab tamer seems like the perfect tool. Ironically, I've managed to (easily) remove the tabs from appearing on any of the pages across the website, EXCEPT for the search pages.

For some odd reason, when I change the options with the last three choices (search/node/%, search/users/%, search404) at the very bottom of the list, after saving, they go back to being "enabled". I've tried several times, and every time I save, they're not changed. I've also tried clearing caches, but the problem persists. Could this be a bug, or a conflict with another module, or preprocess functions overridden in the template.php file?

Thanks a lot for your help.

UPDATE: In fact, even when I try to change the order of any of the last three items, it reverts back to the original order, my changes are not saved. Also, I disabled a Custom Site module that I had made in an attempt to remove the tabs, but Tab Tamer is still giving me problems with the last items.

matt v.’s picture

Sounds like something you might want to submit to the module's issue queue.

tarekshalaby’s picture

Thanks a lot for your help, Matt.

I've started a bug report issue for the Tab Tamer module here: http://drupal.org/node/605286

I'll update this conversation as soon as there are developments on the other end.

Anusha Isaacraj’s picture

Nice module to check out !
Thanks !

tarekshalaby’s picture

So I haven't heard back after filing the bug report, and I don't think I'll be hearing back anytime soon. Having said that, are there any other options? There's got to be ways in which I can remove those tabs, right?

Thank you very much.

matt v.’s picture

In your custom module, inside a hook_menu_alter implementation, you could try using unset to remove the tabs from the menu hierarchy or change the type designation to MENU_CALLBACK.

v8powerage’s picture

This hides all tabs from anonymous users.

In page.tpl.php:

<div class="tabs">
<?php global $user; 
if ($user->uid){?>
<?php print $tabs ?>
<?php } ?>
</div>
tarekshalaby’s picture

WOW, that was so easy. All I did was paste that code in page.tpl.php (and commented out the default code lines for displaying the tabs) and voila! No tabs appear for any anonymous users.

So the ideal solution is to use that code, but also use the Tab Tamer module to control which tabs the authenticated users see. Perfect.

Thank you very much Matt V. and Shaman.