Displaying 1-20 of 92 results.

CTreeView

CTreeView displays a tree view of hierarchical data. To use CTreeView, simply sets data to the data that you want to present and you are there.

Syntax:

$this->widget(
    'CTreeView',
    array('url' => array('ajaxFillTree'))
);


CTextHighlighter

CTextHighlighter does syntax highlighting for its body content.

Example:

$content = 'public function processOutput($output)
{
    $output=$this->highlight($output);
    parent::processOutput($output);
}';
 
$highlight = new CTextHighlighter;
$highlight->language = 'php';
$highlight->showLineNumbers = true;
$highlight->lineNumberStyle = 'list';
 
echo $highlight->highlight($content);


CMarkdown

CMarkdown converts the captured content from markdown syntax to HTML code.


CJuiSelectable

CJuiSelectable displays an accordion widget. CJuiSelectable encapsulates the JUI Selectable plugin.

Syntax:

$this->widget('zii.widgets.jui.CJuiSelectable',array(
    'items'=>array(
        'id1'=>'Item 1',
        'id2'=>'Item 2',
        'id3'=>'Item 3',
    ),
    // additional javascript options for the selectable plugin
    'options'=>array(
        'delay'=>'300',
    ),
));


CJuiResizable

CJuiResizable displays a resizable widget. CJuiResizable encapsulates the JUI Resizable plugin.

Syntax:

$this->beginWidget('zii.widgets.jui.CJuiResizable',array(
    // additional javascript options for the resizable plugin
    'options'=>array(
        'minHeight'=>'150',
    ),
));
    echo 'Your Resizable content here';
 
$this->endWidget();


CJui ProgressBar

CJuiProgressBar displays a progress bar widget. CJuiProgressBar encapsulates the JUI Progressbar plugin.

Syntax:

$this->widget('zii.widgets.jui.CJuiProgressBar',array(
    'value'=>75,
    // additional javascript options for the progress bar plugin
    'options'=>array(
        'change'=>new CJavaScriptExpression('function(event, ui) {...}'),
    ),
    'htmlOptions'=>array(
        'style'=>'height:20px;',
    ),
));


CJui Droppable

CJuiDroppable show a dropable widget in Yii. Yiiframework is using jQueryUI Dropable widget

Syntax:

$this->beginWidget('zii.widgets.jui.CJuiDroppable',array(
    // additional javascript options for the droppable plugin
    'options'=>array(
        'scope'=>'myScope',
    ),
));
    echo 'Your droppable content here';
 
$this->endWidget();


CJui Draggable

CJuiDraggable displays a draggable widget. CJuiDraggable encapsulates the JUI Draggable plugin.

Syntax:

$this->beginWidget('zii.widgets.jui.CJuiDraggable',array(
    // additional javascript options for the draggable plugin
    'options'=>array(
        'scope'=>'myScope',
    ),
));
    echo 'Your draggable content here';
 
$this->endWidget();


CJui Tabs

CJuiTabs displays a tabs widget. CJuiTabs encapsulates the JUI tabs plugin. Changing the properties for Yii CJuitabs, Dynamic Yii CJuiTabs Menu Color, CJuiTabs in Yii


Ajax CJuiAutoComplete

CJuiAutoComplete displays an autocomplete field. CJuiAutoComplete encapsulates the JUI autocomplete plugin.


CJuiAccordion

CJuiAccordion displays an accordion widget. CJuiAccordion encapsulates the JUI Accordion plugin.


CJui Button

CJuiButton displays a button widget. CJuiButton encapsulates the JUI Button plugin.

Syntax:

$this->widget('zii.widgets.jui.CJuiButton',array(
    'buttonType'=>'submit',
    'name'=>'btnSubmit',
    'value'=>'1',
    'caption'=>'Submit form',
    'htmlOptions'=>array('class'=>'ui-button-primary')
    ),
));


CJui Slider

CJuiSlider displays a slider. CJuiSlider encapsulates the JUI slider plugin.

Syntax:

$this->widget('zii.widgets.jui.CJuiSlider',array(
    'value'=>37,
    'options'=>array(
        'min'=>10,
        'max'=>50,
    ),
    'htmlOptions'=>array(
        'style'=>'height:20px;',
    ),
));


CJui Dialog

CJuiDialog displays a dialog widget. CJuiDialog encapsulates the JUI Dialog plugin.


CJui DatePicker

CJuiDatePicker displays a datepicker. CJuiDatePicker encapsulates the JUI datepicker plugin.


How to get current controller and action name

Simple following snippet will print out controller name and action name:


Create multilanguage site

In this example, the default language of the website is English (en), and we will add some French (fr) components.


How to include Javascript, CSS in Yii

There are many methods that we can add javascript, css into your Yii App. Today I will demonstrate some simple and helpul methods.


CMultiFileUpload

CMultiFileUpload generates a file input that can allow uploading multiple files at a time. This is based on the jQuery Multi File Upload plugin. The uploaded file information can be accessed via $_FILES[widget-name], which gives an array of the uploaded


About us
Useful links
Menu