2

There are various types, like "Error, status" and they show up after creating content, or when triggered by a rule.

I'm wondering if it is possible to create a new type, such as "Dev" and have it's visibility limited to certain roles, like administrator.

2 Answers 2

4

The status type can be customised so you're covered with that one.

Assuming you're setting messages using drupal_set_message, you could check if the message should be set based on the status of the user. To make it a bit cleaner, you might want to write a module so you can set a specific permission to show this message to certain roles.

1
  • Spot on! I don't suppose I'd be fortunate enough for there to be a contributed module which allows one to add such things without hacking core? Commented Jan 27, 2012 at 7:12
1

There's a module for D6 that gives you a hook and a class for matching/editing messages displayed to the user - http://drupal.org/project/messages_alter

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.