Using a widget within CTabView

This is a real newbie question but one that has had me stumped for a whole day. I hope someone can spot my mistake and help me correct it. I have searched google and the forums but there is obviously something I am not understanding.

I have created a model named UserUpdate and generated the CRUD content.

Within the views/index.php I have the following code snippet:

<?php $this->widget('CTabView',array(




            'title'=>'Static tab',

            'content'=>'Content for tab 1'




            'title'=>'Test tab',





this renders a blank page with no content when viewed in the browser.

If I change the tab2 code to:


            'title'=>'Test tab',



it renders a page without tabs but with links which are not active.

Could someone please explain why these are not working as expected.

Thanks in advance.

just a thought,

  1. in your method 2, try static content in _view to see if tab show ok;

  2. if works, switch back to your listview, also try passing data to partial like


            'title'=>'Test tab',




Thanks for the reply rootbear.

Your suggestion 1 renders a blank page

Your suggestion 2 renders a page with links and no tabs. The links are not active.

If I change the code to:


            'title'=>'Render tab',




It works correctly.

It seems (I have not tested them all) that any page in any folder below /site gives one of the errors described above.

I found this link My link where meanpenguin was having a similar issue but his suggestions have not resolved my issue.

Has anyone had more thoughts about this?

If so, I would really appreciate your help and comments as it continues to stump me.

Just for the sake of clarity:

if I use


in the tab2 body the page renders correctly (as in graphic below.)



if I use


the page does not render correctly and the links which are displayed do not work(as in graphic below.)



Thanks in advance for any help or insight.

I have not had much time to revisit this or to examine what the differencce is between CTabView and CJuiTabs but after getting back to it I found that using the CJuiTabs widget was the answer.

In case someone else is battling the same issue, here is what worked for me:

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


        'Tab 1'=>array('content'=>'UserFirstName'),

        'Tab 2'=>array('ajax'=>$this->createUrl('Users/create')),

	'Tab 3'=>array('ajax'=>$this->createUrl('Users/admin')),		


    // additional javascript options for the tabs plugin