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.