mosTabs is no longer available in Joomla 1.5. Use this method instead to add tabbed content to your component or module in Joomla 1.5 native mode.
- Include this line of code before you start your tabs
1
jimport ( 'joomla.html.pane');
- Then get the instance for the tabs and assign it to a variable:
1
$myTabs = & JPane::getInstance ( 'tabs' ); - Use the code below to define your tabs:
12345678910111213141516171819202122
// Start the tabs
echo $myTabs->startPane( "my_tabs" );
// Start the first Tab definition
echo $myTabs->startPanel(JText::_('First Tab'),'tab1_id');
// Add the content for the First Tab here...
// Close the First Tab
echo $myTabs->endPanel();
// Start the Tab2 definition
echo $myTabs->startPanel(JText::_('Second Tab'),'tab2_id');
// Add the content for the Second Tab here...
// Close the Second Tab
echo $myTabs->endPanel();
// Close the tabs
echo $myTabs->endPane();
- An alternative to tabs is the slider. To display your content in sliders just get the instance for 'sliders' instead of 'tabs' as shown in the following line of code:
1
$myTabs =& JPane::getInstance( 'sliders' );
No comments:
Post a Comment