Yii Framework Forum: Cjuitabs Showing Multiple Tabs In Content - Yii Framework Forum

Jump to content

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

Cjuitabs Showing Multiple Tabs In Content Rate Topic: -----

#1 User is offline   rpaulpen 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 136
  • Joined: 01-December 08

Posted 01 April 2013 - 02:48 PM

Hi Everyone,

i noticed when adding "id" to CJuiTabs using the following format, some tabs render multiple tabs in the content rather than just the active one.

Here is the code:

$this->widget('zii.widgets.jui.CJuiTabs', array(
    'tabs'=>array(
        'Government'=>array('id'=>'Government', 'content'=>$govContent),
        'Manufacturing & Distribution'=>array('id'=>'Manufacturing & Distribution', 'content'=>$mfgContent),
        'Retail'=>array('id'=>'Retail', 'content'=>$retailContent),
    ),
    'options'=>array(
        'collapsible'=>false,
        'active'=>$tab,
        'show'=>'fadeIn',
   	
    ),
    'htmlOptions'=>array(
        'style'=>'width:910px; height: auto;'
    ),
        
    'themeUrl'=>Yii::app()->baseUrl.'/css/JuiTabs',
    'theme'=>'custom',
        
    'cssFile'=>'jquery-ui-1.10.1.custom.css',
));



If I use the format as below without the id, it works fine.


$this->widget('zii.widgets.jui.CJuiTabs', array(
    'tabs'=>array(
     	'Government'=>$govContent),
        'Manufacturing & Distribution'=>$mfgContent),
        'Retail'=>$retailContent),
        ...



Any ideas on what's going on?

Thanks,
0

#2 User is offline   rpaulpen 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 136
  • Joined: 01-December 08

Posted 02 April 2013 - 05:38 AM

I figure it out and will post it for anyone who might have the same problem. It doesn't like having a space in the 'id'. Not sure why it is a problem since it is wrapped in single quotes.

I had to change the following code:

  'Manufacturing & Distribution'=>array('id'=>'Manufacturing & Distribution', 'content'=>$mfgContent),


to:
 'Manufacturing & Distribution'=>array('id'=>'Manufacturing', 'content'=>$mfgContent),

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