Use the tab in joomla Construction and Development

Source: Internet
Author: User
Tags mootools

Today, when studying how to set up alphauserpoints, it is relatively simple to remove unnecessary items from the user profile, edit/components/com_alphauserpoints/views/account/tmpl/default. the PHP file is ready, and the corresponding modification page changes the default under another folder under views. PHP file. I accidentally discovered joomla's jpane classes and checked its introduction on the official website,

This
Page's content makes references relevant only for joomla! CMS version (s) and
Earlier
The
Use"Jpane"Has
BeenDeprecatedFrom and
Later versions, please use:Jhtltabs.

Jpane class types include 'tabs' and 'sappeers '.

Scyclers implement the mootools accordian effect. Examples are the joomla admin parameters settings. Tabs also implement mootools (but in which degree ?)

Startpane and endpane () require a string identifier.

Jpanes contain panels

Startpanel () and endpanel () require name and ID parameters.

You can set some options in the getinstance method.

Translation:

The types of the jpane class include "label" and "Slider ".
The slider achieves the accordion Effect of mootools. The example is joomla management parameter settings. Labels also implement mootools (but to what extent ?)
Startpane and endpane () require a string identifier.
Jpanes include panel
Startpanel () and endpanel () names and ID parameters.
You can set the getinstance method in some options.


I don't know how to change the alphauserpoints software group. However, there is no big problem when using it. The above class is skipped at will, and it is not supported anyway. Let's take a look at its alternative class:

Jhtmltabs class options
Options for jhtmltabs

Onactive: A callback function when a tab is activated with two Params. 'title' is the tab itself, and 'description' is the tab content.

The callback function triggered when the tab is clicked. There are two parameters: Title (Tab title) Description (Tab description)

Onbackground: A callback function when a tab is backgrounded

Callback Function after a tab is hidden;

Startoffset: The default tab to start with (zero based index ).

Default Tab

Usecookie: Whether or not to use cookies to store tab active state. (Boolean) (true | false) // This is not a string. Don't use quotes.

Whether to use cookies to store tab activity information. attribute: Boolean. Do not use quotation marks because it is not a string.

Example
$options = array(    'onActive' => 'function(title, description){        description.setStyle("display", "block");        title.addClass("open").removeClass("closed");    }',    'onBackground' => 'function(title, description){        description.setStyle("display", "none");        title.addClass("closed").removeClass("open");    }',    'startOffset' => 0,  // 0 starts on the first tab, 1 starts the second, etc...    'useCookie' => true, // this must not be a string. Don't use quotes.); echo JHtml::_('tabs.start', 'tab_group_id', $options); 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');

Now the problem arises. The joomla official website has something like this. What about slider? Why can't I slide the smart tab after the upgrade? Sorry, I will continue to study it.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.