CTabView is used to display Tab pages. The basic way to use TabView is to configure the tabs attribute. you can configure the following attributes for each Tab: CTabView is used to display Tab pages. The basic way to use TabView is to configure the tabs attribute, you can configure the following attributes for each Tab:
Title: tag question.
Content: the content displayed by the tag.
View: The label displays the View Name. if both the Content is specified, the Content is displayed.
Url: The page is redirected to the specified URL when the tag is clicked.
Data: The attribute array that is passed to the View when the View attribute is specified.
In this example, three tabs are displayed with different tag content:
BeginWidget ('cactiveform');?> Widget ('ctabview', array ('activetab' => 'tab2 ', 'tab1' => array ('tab1' => array ('title' => 'static tab', 'content' => 'Content for tab 1 '), 'tab2' => array ('title' => 'render tab', 'View' => 'view '), 'tab3' => array ('title' => 'URL tab', 'URL' => Yii: app () -> createUrl ("site/url"),), 'htmloptions '=> array ('style' => 'width: 500px;');?> EndWidget ();?>
TabView by default, the first page is the current page. you can use activeTab to modify the current page. In this example, the second page is also set to the current page.
The above is the content of the UI component TabView sample in the PHP development Framework Yii Framework tutorial (17). For more information, see PHP Chinese website (www.php1.cn )!