Actions

Difference between revisions of "Using the JHtmlTabs class in a component"

From Joomla! Documentation

m (updates to make multiversion links)
 
(17 intermediate revisions by 5 users not shown)
Line 1: Line 1:
This article covers usage of JHtmlTabs in your Joomla! component for Joomla! versions 1.6 and greater. If you are using Joomla! 1.5, see [[How_to_use_the_JPane_classes_in_a_component]].
+
{{disambig|
 
+
{{version|2.5,3.1}}
===Options for JHtmlTabs===
+
}}
 
+
{{other versions/navbox|The '''Using the JHtmlTabs class in a component''' article is available in these versions:-|version}}
'''onActive''': A callback function when a tab is activated
+
<noinclude>[[Category:Tutorials]][[Category:Component Development]]</noinclude>
'''onBackground''': A callback function when a tab is backgrounded
+
<noinclude>[[Category:Development]]</noinclude>
'''startOffset''': The default tab to start with (zero based index).
+
'''useCookie''': Whether or not to use cookies to store tab active state. (true | false)
+
 
+
===Example===
+
<source lang="php">
+
echo JHtml::_('tabs.start', 'tab_group_id');
+
 
+
echo JHtml::_('tabs.panel', JText::_('PANEL_1_TITLE'), 'panel_1_id');
+
echo 'Panel 1 content can go here.';
+
 
+
echo JHtml::_('tabs.panel', JText::_('PANEL_2_TITLE'), 'panel_2_id');
+
echo 'Panel 2 content can go here.';
+
 
+
echo JHtml::_('tabs.end');
+
</source>
+

Latest revision as of 15:43, 8 May 2013