PHP development framework YiiFramework tutorial (17) UI component TabView example

Source: Internet
Author: User
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 )!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.