Yii 1.1: cdialog

The dialog with the ajax loading content

This widget allows to display the popup Dialog like the common Yii CJuiDialog but allows any layout and ajax loading with the url.

Note: C prefix was left, because of we hope to see the control as part of the Yii soon ;)

  • Allows multi level data load: static and dynamic (Ajax)
  • Allows modal (grayBlock is showing) or simple dialog showing (page items could be clicked)
  • Allows onClose client script functionality
  • Allows onLoad client script functionality
  • Allows ajax dialog content loading
  • Allows easy design change


Yii 1.1.7


To use the extension just unzip all of its contents to the /protected/widgets/ or to the root of your /protected and /images folders.

You could always tune the view of the dialog with the dialog.css

The example of use of the CDialog and the CTree (Flexible Tree) is on the image bellow

Dialog Example

//Example of the dynamic initialization
$this->beginWidget('CDialog', array(
    // title of the dialog
    'title'=> Yii::t('main.default', 'Title'),
    // dialog is showing when page is loading
    // dialog showed with the gray background
    'modal' => true,
    'width' => 400, 
    'height' => 700, 
    // the url from where the dialog content is loading
    'url' => $this->createUrl('/yourModule/controller/getDialog/'), 
    // called when the dialog is loaded
    'onLoad' => ' function () { alert("onLoad Function"); }'
//You should return the content in your controller/action/ 
public function getDialog()
     echo "Dialog's Content";


Total 2 comments

#17184 report it
sysprog at 2014/05/10 03:30pm
Response to the comment of raynox

Hello raynox

Thank you much using the extension

The message tells that the yii could not find the path widgets/views/dialog.php

You must copy all the content to the /protected/widgets/

Open to help you if any other needs

Thank you

#17164 report it
raynox at 2014/05/08 08:16pm
Instalation issues ...

Hello !

After installing when I run my app I keep getting this message:

CDialog cannot find the view "dialog". framework\web\widgets\CWidget.php(246)

Any ideas ?

Leave a comment

Please to leave your comment.

Create extension