Hi all,
I am using Tab Tamer module, and it's works fine for me. Now I have some special requirement to show the tab/menu title based on user roles.
But that kind of option is not available in this module. I have gone through the modules core file tabtamer.module and found there is an hook 'tabtamer_menu_alter'.
I have implemented that hook in my custom module, and try to show the title based on user roles. But the global variable is not working for me. Following are my custom module code please have a look and let me know where is my mistake...
<?php
function custom_module_menu_alter(&$items) {
global $user;
if( isset( $user->roles[4] ) ){
$items['user/%user/view']['title'] = t('Dashboard Type 2');
}if( isset( $user->roles[3] ) ){
$items['user/%user/view']['title'] = t('Dashboard Type 1');
}
return $items;
}
?>
Thanks
Closed: outdated
1.0
Code
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.