To better display the dialog information, create a view like this: views/site/dialog. php
To better display the dialog information, create a view like this: views/site/dialog. php
user->getFlashes()) { foreach($flashes as $key => $message) { if($key != 'counters') { $this->beginWidget('zii.widgets.jui.CJuiDialog', array( 'id'=>$key, 'options'=>array( 'show' => 'blind', 'hide' => 'explode', 'modal' => 'true', 'title' => $message['title'], 'autoOpen'=>true, ), )); printf('%s', $message['content']); $this->endWidget('zii.widgets.jui.CJuiDialog'); } } } ?>
In your layout (views/layouts/main. php) file Add the following line of code:
renderPartial('//site/dialog'); ?>
Then, a good jquery ui dialog box will display your dialog information.
In addition, we recommend a nested function:
user->setflash($id, array('title' => $title, 'content' => $message) ); } } ?>
In this way, you can trigger your conversation, even if there is HTML content and different buttons in it, it is so easy:
$message = 'Hello World!'; $message .= '
Where do you want to go today?
'; $message .= CHtml::Button('Home', array('submit' => array('home/admin'))); $message .= '
'; $message .= CHtml::Button('Far far away', array('submit' => array('far/away'))); Dialog::message('Title', $message);
Or just
Dialog::message('title', 'content');
I hope these code segments will help you. Please send any comments, suggestions or errors to thyseus@gmail.com. thank you