Class CJuiAccordion
CJuiAccordion displays an accordion widget.
CJuiAccordion encapsulates the JUI Accordion plugin.
To use this widget, you may insert the following code in a view:
$this->widget('zii.widgets.jui.CJuiAccordion',array( 'panels'=>array( 'panel 1'=>'content for panel 1', 'panel 2'=>'content for panel 2', // panel 3 contains the content rendered by a partial view 'panel 3'=>$this->renderPartial('_partial',null,true), ), // additional javascript options for the accordion plugin 'options'=>array( 'animate'=>'bounceslide', ), ));
By configuring the CJuiWidget::$options
property, you may specify the options that
need to be passed to the JUI accordion plugin. Please refer to the JUI Accordion API documentation for possible options (name-value pairs) and
JUI
Accordion page for general description and demo.
- CComponent
- CBaseController
- CWidget
- CJuiWidget
- CJuiAccordion
Copyright: 2008-2013 Yii Software LLC
License: http://www.yiiframework.com/license/
Author: Sebastian Thierer <sebathi@gmail.com>
Author: Qiang Xue <qiang.xue@gmail.com>
Since: 1.1
Located at x2engine/framework/zii/widgets/jui/CJuiAccordion.php
public
|
getScriptFile(),
init(),
registerCoreScripts(),
registerScriptFile(),
resolvePackagePath(),
setScriptFile()
|
__construct(),
actions(),
getController(),
getId(),
getOwner(),
getViewFile(),
getViewPath(),
render(),
setId()
|
beginCache(),
beginClip(),
beginContent(),
beginWidget(),
createWidget(),
endCache(),
endClip(),
endContent(),
endWidget(),
renderFile(),
renderInternal(),
widget()
|
public
array
|
$panels | array() |
#
list of panels (panel title=>panel content). Note that neither panel title nor panel content will be HTML-encoded. |
public
string
|
$tagName | 'div' |
#
the name of the container element that contains all panels. Defaults to 'div'. |
public
string
|
$headerTemplate | '<h3><a href="#">{title}</a></h3>' |
#
the template that is used to generated every panel header. The token
"{title}" in the template will be replaced with the panel title. Note that if
you make change to this template, you may also need to adjust the 'header'
setting in |
public
string
|
$contentTemplate | '<div>{content}</div>' |
#
the template that is used to generated every panel content. The token "{content}" in the template will be replaced with the panel content. |
$_scriptFile,
$cssFile,
$htmlOptions,
$options,
$scriptUrl,
$theme,
$themeUrl
|
$actionPrefix,
$skin
|
$controller,
$id,
$owner,
$viewPath
|