I partially agree with you.
Just to give an example, to generate the following html code
<div data-role="collapsible-set">
<div data-role="collapsible" data-collapsed="false">
<h3> Section 1 </h3>
<p>I'm the collapsible content for section 1. </ p>
</div>
<div data-role="collapsible">
<h3> Section 2 </h3>
<p>I'm the collapsible content for section 2. </ p>
</div>
</div>
Php code is required
$contentAccordion['Section 1'] = "I'm the collapsible content for section 1.";
$contentAccordion['Section 2'] = "I'm the collapsible content for section 2.";
$this->widget('zii.widgets.jui.CJuiAccordion'
array (
'panels' => $contentAccordion,
'options' => array (
'animated' => 'bounceslide'
'heightStyle' => 'auto',
)
'htmlOptions' => array (
'data-role' => 'collapsible-set'
'data-theme' => 'c',
'data-content-theme' => 'd'
)
)
);
With this I can add the data-role = "collapsible-set ’
but not so data-role = ‘collapsible’ for each accordion-panel
But I think that this could simply change the way to create a CJUIAccordion.
Thus instead of
$this-> widget ('zii.widgets.jui.CJuiAccordion', array (
'panels' => array (
'panel 1' => 'content for panel 1',
'panel 2' => 'content for panel 2',
)
//Additional javascript options for the accordion plugin
'options' => array (
'animated' => 'bounceslide'
)
));
Can be created as follows
$this-> widget ('zii.widgets.jui.CJuiAccordion', array (
'panels' => array (
'panelID'=>array('title'=>'panel 1', 'content'=>'content for panel 1 ','options'=>'arrayOfSomeOptions',' htmlOptions'=>'arrayOfSomeHtmlOptions'),
'panelID'=>array('title'=>'panel 1', 'content'=>'content for panel 1 ','options'=>'arrayOfSomeOptions',' htmlOptions'=>'arrayOfSomeHtmlOptions'),
)
//Additional javascript options for the accordion plugin
'options' => array (
'animated' => 'bounceslide'
)
));
Please let me know if I’m wrong