CJuiTabs

With CTabView, I specified tabs as follows:




$tabs = array(

  'start'=>array('title'=>'Start', 'view'=>'/mycontroller/start_form'),



But now, I’m looking at CJuiTabs and I can’t tell simply from looking at the API page how to call a view like this… it seems like I could load this view via ajax with a controller action for each view I want to use. This seems crazy since the CTabView lets me reference views directly without needing anything in the controller.

Can someone show me or link me to the way to use CJuiTabs with view files without using ajax or controller/actions?

Thanks.

try




$this->widget('zii.widgets.jui.CJuiTabs', array(

    'tabs'=>array(

        'StaticTab 1'=>$this->renderPartial("_partialView", array("foo"=>$bar), true),

    ),

    // additional javascript options for the tabs plugin

    'options'=>array(

        'collapsible'=>true,

    ),

));



untested though, should work

also. if you wanted to do it the AJAX way, then just add caching to the options array




'cache'=>true



Yeah, you got it right there. That certainly does the trick… a little sloppy in my opinion, but effective. Thanks, buddy.