Skip to content

Instantly share code, notes, and snippets.

@eduardoromero
Created January 25, 2013 03:52
Show Gist options
  • Save eduardoromero/4631616 to your computer and use it in GitHub Desktop.
Save eduardoromero/4631616 to your computer and use it in GitHub Desktop.
Foundation formated divs for Cake's Flash message.
<div class="alert-box alert">
<?php echo $message ?>
<a href="" class="close">&times;</a>
</div>
<div class="alert-box secondary">
<?php echo $message ?>
<a href="" class="close">&times;</a>
</div>
<div class="alert-box success">
<?php echo $message ?>
<a href="" class="close">&times;</a>
</div>
<div class="alert-box">
<?php echo $message ?>
<a href="" class="close">&times;</a>
</div>
@eduardoromero
Copy link
Author

On the controller just use

$this->Session->setFlash("message", 'Foundation.cake-flash-success');

The second param is the template to use. It could probably be merged as one and get the type of box in the params of the call, but I'm lazy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment