Yii 1.1: etoastr

toastrjs for Yii framework flash messages

Small widget for displaying awesome flash messages


Yii 1.1 or above


Unpack to protected/extensions/widgets

in your theme or the view where you want to use the flash messages put this:

        'flashMessagesOnly'=>true, //default to false
        'message'=>'will be ignored', //because flashOnlyMessages is true
        //the options passed to the plugin
            'fadeOut'   =>  1000,
            'timeOut'   =>  10000,
            'fadeIn'    =>  1000


Total 9 comments

#16575 report it
Daniel at 2014/03/07 03:31am
How to display [x] close button


Below is my code

$this->widget('ext.etoastr.EToastr', array(
    'flashMessagesOnly' => true, //default to false
    'message' => 'will be ignored', //because flashOnlyMessages is true
    //the options passed to the plugin
    'options' => array(
        'positionClass' => 'toast-bottom-full-width',
        'fadeOut' => 1000,
        'timeOut' => 8000,
        'fadeIn' => 1000,
        'closeButton' => true,

However, I could not still see the close button. What should I put on the options?



#12656 report it
grandoom at 2013/04/04 05:41am

thx , i use this widget always...

i suggest you to upgrade you'r widget like this for use complex Html messages on 'flashMessagesOnly'=>true,

                $toastrScript .='toastr.info(' . CJavaScript::Encode($this->message) . ', "'. $this->title .'")';           
            }else {
                    $toastrScript .='toastr.success(' . CJavaScript::Encode($this->message) . ')';


#12598 report it
v_bogdan at 2013/03/31 11:04am

working great. thnx

#12526 report it
shaan360 at 2013/03/26 05:24am
thank you

Some thing i was looking for long time

#12498 report it
bardoo at 2013/03/24 05:53am
to be every day better

Great, awesome and very useful, thanks Brother.

#12482 report it
Nur Rochim at 2013/03/22 12:29pm

wow...very cool... Thanks

#12467 report it
grandoom at 2013/03/22 10:30am
thx nice job and bootstrap compliant!

Great, thanks! cause i coul'ndt use ToastMessage with my bootstrap application. I think etoastr will be more Yii friendly cause ToastMessage don't work in all case... (e.g. with bootstrap)

Keep this plugin alive

#12465 report it
Cherif at 2013/03/22 10:15am
re Look as ToastMessage

Thank you for your feedback, I didnt see ToastMessage before but it seems it is not the same jquery plugin and I keep this extesion always simple to use for one purpose.

#12462 report it
Clem at 2013/03/22 09:59am
Look as ToastMessage

Great, thanks! But I'm using ToastMessage now...

Leave a comment

Please to leave your comment.

Create extension