Simple use of the Yii2 tab, yii2 Tab

Source: Internet
Author: User

Simple use of the Yii2 tab, yii2 Tab

The example in this article shares the specific code used by the Yii2 tab for your reference. The details are as follows:

<! -- Tab start --> <? Phpecho \ yii \ bootstrap \ Tabs: widget (['id' => 'tabs', 'rendertabcontent' => false, // if you want to display custom DIV or Render page files in each tab, set it to false. 'linkoptions' => ['data-toggle '=> "tab"], 'items' => [['label' => Yii: t ('app ', 'account settings'), 'content' => '', 'headeroptions' => [" id "=> 'li _ account'], // you can set 'url' => '# tab_account', 'activity' => true,], ['label' => Yii: t ('app ', 'Change password'), 'content' => '', 'headeroptions' => [" id "=> 'Li _ password'], 'url' => '# tab_password', 'active' => false,], ['label' => Yii :: t ('app', 'Bind mailbox '), 'content' => '', 'headeroptions' => [" id "=> 'li _ e-mail'], 'url' => '# tab_email', 'active' => false,])?> <Div class = "tab-content"> <! -- Modify personal information --> <div class = "tab-pane active" id = "tab_account"> <! -- ID corresponds to the URL of the above 1st items --> content... </div> <! -- Change Password --> <div class = "tab-pane" id = "tab_password"> <! -- ID corresponds to the URL of the above 2nd items --> content... </div> <! -- Bind email --> <div class = "tab-pane" id = "tab_email"> <! -- ID corresponds to the URL of the above 3rd items --> content... </div> <! -- Tab end -->

The above is all the content of this article. I hope it will be helpful for your learning and support for helping customers.

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.