Actions
Subrion Notification Boxes¶
Notification Boxes are displayed after action is completed. They could be of three types:
- error - used when error is occured during form processing
- notification - used when action successfully completed
- exclamation - predefined exclamation type notification box
In order to display notification box you should use the following smarty function:
{ia_notification}
It has three params:
- type - error or notif or STRING - it will be used for the class in your notification.tpl file
- msg - string or array of messages to display
- ordered - if true uses ordered list
Please use it everywhere in the script.
SMARTY: {sbr_notification type=$type msg=$msg ordered=true}
PHP: if ($error) { $error = true; $msg[] = 'Error happens!'; } else { $error = false; $msg[] = 'Action happens!'; }
No need to define new variables. $msg and $error are used by default. No need to pass their values to smarty
Updated by Vasily Bezruchkin over 8 years ago ยท 1 revisions