<p>In a <code>CakePHP 1.2</code> app, I'm using </p>

<pre><code>&lt;?php $session-&gt;flash();?&gt;
</code></pre>

<p>to output messages like "Record edited". It's working great.</p>

<p>However, I want to add a link called "Dismiss" that will fade out the message. I know how to construct the link, but I don't know how to insert into the output of the flass message.</p>

<p>The flash message wraps itself in a <code>DIV tag</code>. I want to insert my dismiss code into that div, but I don't know how.</p>

Figured this out:
Create a new layout in your layouts folder:
```
```
layouts/message.ctp
```
```
In that layout, include the call to output the content:
```
```
<?php echo $content_for_layout; ?>
```
```
Then when you set the flash message, specify the layout to use:
```
```
$this->Session->setFlash('Your record has been created! Wicked!','message');
```
```