Is there a message helper?
Permalink
In dashboard pages I have been using the validation helper
to note and display error messages.
Just wondering - Is there a similar helper mechanism for showing success messages? (to date I have been writing an appropriately styled div the long way).
Loader::helper('validation/error');
to note and display error messages.
Just wondering - Is there a similar helper mechanism for showing success messages? (to date I have been writing an appropriately styled div the long way).
No, do you need this? Error object can be augmented for multiple errors to direct user at everything that went wrong. But success is just success ;-)
If you're in a dashboard page, you can just do $this->set('message', 'Your message here'); -- and it will display that (you don't need to worry about outputting the message in your own view code -- the dashboard theme already handles that).
If you're not in the dashboard, though, then no you will need to output your own messages somehow.
If you're not in the dashboard, though, then no you will need to output your own messages somehow.
My personal approach is something like
Jon