Yii 1.1: yii-flash

Widget for displaying web user flash messages

Flash is a modest widget that allows you to render web user flash messages easily.


A newer version of this extension, TbAlert, is now part of my Bootstrap extension.


To set up the widget you simply need to download the extension, place it in your application's extensions folder (create it under protected if it doesn't exist).

Rendering the widget is easy, you need to add the following code snippet to your main layout (Assuming you placed the extensions under /protected/extensions/flash) :

<?php $this->widget('application.extensions.flash.Flash', array(
)); ?><!-- flashes -->

After you've configured the widget it will display your flash messages.

Total 7 comments

#6077 report it
Chris83 at 2011/12/10 06:58am
BootFlash is now TbAlert

BootFlash has evolved to TbAlert which is a part of the Bootstrap extension.

#5427 report it
Chris83 at 2011/10/11 02:37am
Moved to Bootstrap

Hey All,

A newer version of this extension, BootFlash, is now part of my Bootstrap extension.

Bootstrap can be found here: http://www.yiiframework.com/extension/bootstrap/

#5018 report it
waitforit at 2011/09/06 11:00pm
What about ajax messages

Does this extension work out of the box with AJAX flash messages? For example, deleting something in a cGridView.

#4947 report it
Peter JK at 2011/08/31 06:54am
thank you..

hi Chris83,

but, I put this widget in my main.php, so it became my main notification both success and error...

#4738 report it
Chris83 at 2011/08/10 05:35am

You need to set the correct category when setting the flash message and then configure yii-flash to display that category. By default the error category is called 'error'.

#4474 report it
Peter JK at 2011/07/12 07:27am
thank you..

very nice extension.. thank you Chris83 for the nice extension. Help me so much.. but just curious, how about to show error message with the different class?.. i still using the default blueprint css, it use different class for success and error...

#3515 report it
intel352 at 2011/04/16 04:33pm
Good solution

Understood what this extension is intended for as soon as I saw your example. Nice extension, good job :-)

Leave a comment

Please to leave your comment.

Create extension