An enhanced FlashComponent capable of
X-Flash for example, for REST/AJAX requestsAttach it to your controllers in initialize() like so:
$this->loadComponent('Tools.Flash');
Also add the helper for it:
public $helpers = array('Tools.Flash');
In your layouts, you don't need to change the $this->Flash->render() call, as the syntax for this helper is the same.
// Inside an action
$this->Flash->message('Yeah it works.', 'success');
$this->Flash->message('Careful.', 'warning');
$this->Flash->message('O o.', 'error');
// Inside an action
$this->Flash->success('Yeah it works.');
$this->Flash->warning('Careful.');
$this->Flash->error('O o.');
It will also work with the AuthComponent, which internally uses FlashComponent::set(). This method has been provides as core hook internally.
You can use any type (success, warning, error, info, ...) of message, except the two reserved ones message and set.
At least if you plan on using the magic method invokation. But even if not, it would be good practice to not use those two.