We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

Tab Menus

Development and Programming

Aaron Wagner's avatar
Aaron Wagner
2 posts
15 years ago
Aaron Wagner's avatar Aaron Wagner

Hello, I have been scouring the forums looking for more documentation on how to add tabs to a CP page I am working on for one of my custom modules. The only thing I have found is this page:

http://ellislab.com/expressionengine/user-guide/development/cp_styles/index.html#tab_menu

But that code seems really incomplete. Does anyone have any working examples of tabs being implemented?

       
johnwbaxter's avatar
johnwbaxter
651 posts
14 years ago
johnwbaxter's avatar johnwbaxter

Hey, i know this is a bit late! But maybe it will help someone further down the line.

The example you’re looking at just a menu, with a tabbed look and feel, it’s not a jquery dynamic menu.

If you want to create jquery dynamic tabs then you need to add this kind of thing into your controller

$this->EE->cp->add_js_script('ui', 'tabs');
$this->EE->javascript->output('$("#tabs").tabs();');

and

In your view file

<div id="lnk_tabs">
    <ul>
        <li><a href="#tabs-1">tab 1</a></li>
        <li><a href="#tabs-2">tab 2</a></li>
        <li><a href="#tabs-3">tab 3</a></li>
    </ul>
    
    <div id="tabs-1">
        test 1
    </div>
    
    <div id="tabs-2">
        test 2
    </div>
    
    <div id="tabs-3">
        test 3
    </div>
    
</div>
       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.