It would be interesting to have tabs take into consideration roles, taxonomy, and CCK fields. For example:

1. hide tab if role is equal to (this would cover user profiles)
2. hide tab if node has taxonomy term (this would cover taxonomy)
3. hide tabe if node is content type (this would cover types of content)
3. hide tab if cck content field is equal to (this would cover other stuff, mostly, anyway)

Something like that. Just checking out this module today and it looks pretty cool so far!

Thanks!

Comments

shane birley’s picture

Title: Hide Tab Based on Role » Hide Tab Based On Role, Taxonomy, Content Type, CCK, Rules, and Actions

May also include connections to the rules and actions modules too. Just brainstorming a bit.

AviadG’s picture

Great idea! would love to see it developing.

danny_joris’s picture

+1 Interesting ideas.

liquidcms’s picture

the other things that tt does besides hiding would also be good.. like renaming, for example... and specifically for node type

TimelessDomain’s picture

Title: Hide Tab Based On Role, Taxonomy, Content Type, CCK, Rules, and Actions » Integration with Context - Control Tabs Based On Role, Taxonomy, Content Type, CCK, Rules, and Actions

we should narrow this down some so that we can determine the best starting point.

Perhaps Tab Tamer settings per user role should be first. It would work the same way as the permissions system (inclusive) -- this is important if you only want to change specific tab occurrences/ contexts & not be forced to have to manage completely different tab settings per role (or per context) for EVERY tab. The weight (order) of the roles would determine which role-based Tab Tamer setting would apply.

TimelessDomain’s picture

Issue tags: +context module

Tab Tamer could be combined with the Context module http://drupal.org/project/context -> to provide the triggers or scenarios (aka context) -> then tab tamer provides the actual actions/ theme alterations accordingly
This seems to be the ultimate solution & application of the Tab Tamer module and this advanced feature is not currently provided by any other module. Hence i have changed the title & opened a corresponding issue in the Context module project issue queue.

Context Issue #1118414: Integration with Tab Tamer

Came across this tutorial today, Creating Drupal Context Plugins, which will help with this plan - http://drupalconnect.com/blog/cmjns/creating-drupal-context-plugins

artbussy’s picture

I'm also interested in taming tabs per user role.

GRRaka’s picture

Also interested. Willing to help if possible.
Particularly - removing edit tab on content type X for user role Y where CCK field value = Z.

mrfelton’s picture

+1

thorandzeus’s picture

+1

abcdgeek’s picture

Subscribing

Anonymous’s picture

Keep in mind that tabs are part of the Drupal core menu system, which is always cached. Menu Tabs use access callbacks, which can be overriden. But this means that Tab Tamer should overrride *every* menu tab access callback, and rewrite it to add context/rules integration. Other modules sometimes also override menu access callbacks.

In any case, if you want to change the access callback for a single tab, check out hook_menu_alter() and change the access callback, like so:

function hook_menu_alter(&$items) {
  $items['my/tab/path']['access callback'] = 'my_new_tab_path_callback';
}

function my_new_tab_path_callback() {
  // ... add code here, your contexts/rules whatever
  // return TRUE or FALSE
}

I don't think Tab Tamer can do this. Drupal Core isn't flexible enough.

Anonymous’s picture

Status: Active » Closed (duplicate)

Combining all related issues into 1, marking as duplicate of
#1326382: Add access callback contingencies for Context, PHP, Rules, Admin etc.