Ctabview

Hi Yii Forum Members,

I have been wrestling with child tabs and can’t seem to get them to operate correctly.

I have this in my view:





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

                    'cssFile'=>false,  

                    'tabs'=>array(

                        'tab1'=>array(

                            'title'=>'My Convo',

                            'view'=>'/post/_mine',


                        ),

                        'tab2'=>array(

                            'title'=>'Friends Convo',

                            'view'=>'/post/_friend',

                        ),

                        'tab3'=>array(

                            'title'=>'Associates Convo',

                            'view'=>'/post/_assoc',

                        ),                        

                    ),

                 ))?>



I have this at the top of each partial view (_mine, _friend, and _assoc) a renderPartial of a second CTabView:

(i tried removing the renderPartial and placing them in directly but still didn’t work)




<?php

   $this->widget('CTabView', array(

        'tabs' => array(

            'childTab1' => array(

                'title'    => 'Child Tab 1',

                'content'  => '/post/_talk'

            ),

            'childTab2' => array(

              'title'    => 'Child Tab 2',

              'content'  => '/post/_show'

            ) 

        )

    ));

    

    ?>



Under the parent tab ‘My Convo’ both child tabs select fine, but under “Friends Convo” and “Associates Convo” the second child tab will not select. Is there something I’m missing here…please help. Thanks

Still not working… I want to clarify that my child tabs need only be just for the top portion of each parent tab. Each parent tab will display something different under the child tabs… the child tabs are only to change up different ways to enter information for posting below it. The posted information will not be displayed within the child tab but under it inside the parent tab. Thanks for your suggestions.

Do the child tabs share the same ids? I guess it could be a cause of the problem.

Yes yes!! You’re great softark and exactly right! Thank you much :D