Tabs in Joomla 1.5

While we were modifying a component to run under Joomla 1.5 native, we did notice that the component uses the class mosTabs to display it's backend content in several tabs. Since mosTabs is not available anymore in Joomla 1.5, here is the solution we found.

You must include this line of code before attempting to call tabs functionality:

jimport ( 'joomla.html.pane');

Then get the instance for the tabs and assign it to a variable as displayed below:

$myTabs = & JPane::getInstance ( 'tabs' );

From here, everything is quite easy. Simply use the code below to insert the required code to get the tabs rendered in the component's area:

  // Start the tabbed content, include this line ONLY ONCE
  echo $myTabs->startPane( "my_tabbed_content" );

     // Start the Tab1 definition
     echo $myTabs->startPanel("Tab1 Title","tab1-id");

        // Here you can display the content for Tab1

     // Close the Tab1 definition
     echo $myTabs->endPanel();

     // Start the Tab2 definition
     echo $myTabs->startPanel("Tab2 Title","tab2-id");

        // Here you can display the content for Tab2

     // Close the Tab2 definition
     echo $myTabs->endPanel();

  // Close the tabbed content, include this line ONLY ONCE
  echo $myTabs->endPane();

A nice variant for tabbed content is slider. To display your content in sliders just get the instance for 'sliders' instead of 'tabs' as shown in the following line of code:

$myTabs =& JPane::getInstance( 'sliders' );

Source: joomlaportal.de

Comments  

 
0 #1 2010-07-21 07:46
Hi,
I have used it . But it is not seems to working . SO i have searched it and find this .
http://docs.joomla.org/How_to_use_the_JPane_classes_in_a_component
Quote
 
Please read our Refund Policy in order to know the details of our Money Back Guarantee
Please read our Refund Policy in order to know the details of our Money Back Guarantee

Member Login

PayPal

Share your experience

Have you had a good experience with our Joomla! Extensions? Send us your testimonial and any URL you want to link, and if your comment is published, then we'll gladly place a link to your site an appropriate page.
You are here: Home Blog Tabs in Joomla 1.5

Business Oportunity

Affiliates ProgramWant to earn a new revenue stream? Join our Affiliate program today! For each purchase you generate, you receive a huge percentage of the sale price.

ROALCANA's Blog

Our blogDo visit our blog, where we continue to provide useful tips and handy hints to use, customize and develop Joomla on your websites.
Go to blog

Trademark Disclaimer

Product names, logos, brands, and other trademarks referred to within roalcana.com are the property of their respective trademark holders. These trademark holders are not affiliated with Roalcana, our products, or our website. They do not sponsor or endorse any of our solutions.