Yii Framework Forum: Ctabview - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Ctabview child tabs not selecting Rate Topic: -----

#1 User is offline   inProcess 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 22
  • Joined: 10-June 12

Posted 09 October 2012 - 12:36 AM

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
0

#2 User is offline   inProcess 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 22
  • Joined: 10-June 12

Posted 09 October 2012 - 10:07 AM

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.
0

#3 User is offline   softark 

  • Keep It Simple
  • Yii
  • Group: Moderators
  • Posts: 2,005
  • Joined: 16-February 11
  • Location:Japan

Posted 09 October 2012 - 11:01 AM

View PostinProcess, on 09 October 2012 - 12:36 AM, said:

<?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'
            ) 
        )
    ));
    
    ?>


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

#4 User is offline   inProcess 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 22
  • Joined: 10-June 12

Posted 09 October 2012 - 07:06 PM

View Postsoftark, on 09 October 2012 - 11:01 AM, said:

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
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users