I am looking to manipulate the
$session->flash() output in my CakePHP app, Currently I have the very simple default implementation of showing flash and auth error messages:
<?php $session->flash(); $session->flash('auth'); ?>
This produces a
<div> with an ID and class that has the message inside. What I would like to do is wrap/replace the generated HTML, specifically with some jQuery UI classes, but wrapping is difficult as I am unable to tell when there is actually a message going to be displayed so I end up with an empty but style error div. What I really need for wrapping to work is to check in $session->flash() returns anything, but I get 'can't use method return value in write context' when checking it with empty();
As far as I can tell the generated HTML is hard coded into the session helper! Bonus points if you can work out how to change the class on the auth message and normal flash message independently.