1

How can I check in a theme-file.tpl.php if the administration toolbar is visible or not?

The easiest, but not nicest way to check that, if the user has certain user roles. But is there a way to check that, without checking the roles?

1 Answer 1

3

I think using the user_access function to see if they have the "access toolbar" permission should work.

Some example code:

if (user_access('access toolbar')) {
  // Your logic here.
}
0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.