PHP development framework Yii Framework tutorial (33) Zii component-Accordion example

黄舟
Release: 2023-03-05 09:20:01
Original
1497 people have browsed it

The Zii component contains some UI components based on JQuery, which are defined in the package zii.widgets.jui, including CJuiAccordion, CJuiAutoComplete, CJuiDatePicker, etc. This article introduces CJuiAccordion, which displays an Accordion component (a UI component that can be folded like an accordion). This control encapsulates the JUI Accordion plug-in.

Basic usage is as follows:

$this->widget('zii.widgets.jui.CJuiAccordion', 
array('panels'=>array('panel 1'=>'Content for panel 1','panel 2'=>'Content for panel 2',
'panel 3'=>$this->renderPartial('_content1',null,true),),'options'=>array('collapsible'=>true,'active'=>1,),
'htmlOptions'=>array('style'=>'width:500px;'),));
?>
Copy after login

Define several foldable pages of Accordion by defining the panels attribute, and transmit parameters to the JUI Accordion plug-in by configuring options.

The above is the content of the PHP development framework Yii Framework tutorial (33) Zii component-Accordion example. For more related content, please pay attention to the PHP Chinese website (www.php.cn)!

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!