This is a description of my code. I have parent tab “General” and other parent tabs of-course. but i would like to render sub tabs in general tab. This scripts render the child tabs in parent line along with ‘general’ tab and inside general tab as well.
And then create a new view file childTab.php in the same folder which contain:
$this->widget('CTabView', array(
'tabs' => array(
'childTab1' => array(
'title' => 'Child Tab 1',
'content' => 'This is the content of child tab 1'
),
'childTab2' => array(
'title' => 'child Tab 2',
//use 'view' => 'childTab2Content' if the content is to complex,
//so you can create the content in a different view file (childTab2Content.php)
'content' => 'This is the content of child tab 2'
)
)
));
I used CClipWidget because i found it very easy for me to put complex content on the tab within the same file. I dont want to have alot of view files tobe rendered in a tab. I tried CjuiTabs, but i failed to nest tabs. Thanks to trick now i have nested tabs
But one more thing Tricky_world. how can i put complex contents (contents with codes) in my tabs within same file or at least first tab.
$this->widget('CTabView', array(
'tabs' => array(
'generalTab' => array(
'title' => 'General',
'view' => 'childTab' //PUTING COMPLEX CONTETS HERE DIRECTLLY
),
'otherParentTab' => array(
'title' => 'Parent Tab',
'content' => 'This is the other parent tab content'
)
)
));