I´m using an Omega subtheme in a Drupal 7 installation.
I´ve set at the theme configuration, that Drupal should show the tabs ($tabs
).
What I want is to show the tabs only to a specific role. I try this snippet out, wich didn´t worked. My guess is that it didn´t worked because I´ve told Drupal through the omega subtheme, to show the tabs. And the theme show them to everybody.
If I uncheck "show tabs" variable, they won´t show up, no matter what I do at my template file.
If I uncheck the tabs but add them inside my page template file, whey won´t show up either.
I want to be able to show the tabs or not according to the logged in user role. Here´s my snippet that doesn´t worked (at my page.tpl.php file):
<?php
global $user;
if (!in_array('admin', array_values($user->roles))) {
print render($tabs);
}
else {}
?>
What should I do? Thanks for your help!!