Hi All,
I am new to drupal programming. What is the drupal php varaible that shows messages/alerts on the drupal theme?
Use drupal_set_messages() in your page.tpl.php in your drupal theme.
<?php drupal_set_message($message = NULL, $type = 'status', $repeat = TRUE)?>
This sets a message which reflects the status of the performed operation.
If the function is called with no arguments, this function returns all set messages without clearing them.
$message The message should begin with a capital letter and always ends with a period '.'.
$type The type of the message. One of the following values are possible:
* 'status' * 'warning' * 'error'
$repeat If this is FALSE and the message is already set, then the message won't be repeated.
These messages can be shown in nice popus using popup api module. They can also be themed to look like stackoverflow.com popups.
Use drupal_set_messages() in your page.tpl.php in your drupal theme.
<?phpdrupal_set_message($message = NULL, $type = 'status', $repeat = TRUE)
?>
This sets a message which reflects the status of the performed operation.
If the function is called with no arguments, this function returns all set messages without clearing them.
$message The message should begin with a capital letter and always ends with a period '.'.
$type The type of the message. One of the following values are possible:
* 'status'
* 'warning'
* 'error'
$repeat If this is FALSE and the message is already set, then the message won't be repeated.
These messages can be shown in nice popus using popup api module. They can also be themed to look like stackoverflow.com popups.