This short extension allow you to easily add a div containing tabs.
Requirements ¶
- Yii 1.1 or above
- jquery ui
Usage ¶
Just initialise the widget with the required params:
<?php $this->widget('application.extensions.ETabbedDiv',
array(
'divClass' => 'tabbed',
'tabs' => array(
'tab1' => array('content' => '<p>this is the first tab</p>'),
'tab2' => array('title'=>'Second', 'content' => '<p>this is the second tab</p>'),
'other' => array('content' => '<p>this is the third and last tab</p>'),
),
),
);
?>
Whith:
- divClass (optional) : the css class for the main div,
- tabs : an associated array, the key is the id of the tab (must be unique) and the value is another array:
- title (optional) : the title displayed in the tab. If not set, the id is used,
- content : the html content of the tab
If you have any questions, please ask in the forum instead.
Signup or Login in order to comment.