Extension:Header Tabs

This extension transforms top-level MediaWiki headers into tabs using either the jQuery or the [http://developer.yahoo.com/yui/ Yahoo! User Interface (YUI)] Javascript libraries. With MediaWiki 1.16 and lower, YUI is used; while with MediaWiki 1.17 and higher, jQuery (and its related library, jQuery UI) is used. The jQuery library that is used is a set of files contained in MediaWiki itself.

Usage
To enable tabs on a page after you installed the extension, you need to add a tag into the page in place where the last tab should end (everything below this tag will be shown under the tab view). Most of the time, though, you'll want to put it at the bottom of the page.

In addition to that, the page should have top-level headers defined in it like this: = Header title = Each such top-level header, if it's anywhere above the &lt;headertabs/&gt; tag, will be displayed as a tab.

Linking to tabs
You can link to a tab, both from another page and from within that same page (and, within that same page, both from another tab and from outside the tab view). This is done using the  parser function, which is called like this:

This will create a link to the tab with the name "Tab name", and the text of the link will read "Link text". If you want the link to a point to a tab on another page, you can optionally add the third parameter, "Page name".

Semantic MediaWiki factbox
In addition to user-defined tabs, Header Tabs can convert the Semantic MediaWiki factbox into a tab, and add it as the last tab in the tab view.

Example
Some text above the tab view

= First section header = This will be displayed on the first tab

= Second section header = This will be displayed on the second tab

= Third section header = This will be always displayed under the tab view because it's below the &lt;headertabs/&gt; tag.

The header titles get automatically converted into tab titles.

Download
You can download the Header Tabs code in either one of these files:
 * header_tabs_0.8.3.tar.gz
 * header_tabs_0.8.3.zip

You can also download the code directly via SVN from the MediaWiki source code repository, at http://svn.wikimedia.org/svnroot/mediawiki/trunk/extensions/HeaderTabs/. From a command line, you can call the following: svn checkout http://svn.wikimedia.org/svnroot/mediawiki/tags/extensions/HeaderTabs/REL_0_8_3/

Installation
First, download the code into your wiki's  folder.

Then add the following to LocalSettings.php:

Skin modification
If you want to override the YUI skin, feel free to modify your skin and assign skin class (e.g. ) to   tag. See YUI skinning documentation for more details.

Configuration parameters
The following parameters can be changed in the LocalSettings.php file below the :

$htUseHistory
The  variable defines whether tab navigation should be tracked within the browser history and within the URL, updating the hash value. By default this variable is set to true, i.e. history is used. You can disable it by adding the following:

Note: with the code that is compatible with MediaWiki 1.17 and later, and uses jQuery, the value of  is ignored - clicking on separate tabs cannot yet be saved in the browser history.

Known issues

 * When used with MediaWiki 1.16 and lower, this extension may break custom skins, because it overrides styles like body, table, pre, code etc. (it uses default YUI reset styles)
 * A table of contents doesn't make much sense when tabs are used. Right now you can disable it with . Later versions might force this.
 * Header Tabs, when used with the MathJax extension, leads to faulty HTML, which results in a broken display in at least the Firefox web browser.
 * Header Tabs doesn't work with Extension:Terminology. The header tabs don't appear.

Support
The best way to seek help with this extension is to send questions to wikitech-l mailing list:

https://lists.wikimedia.org/mailman/listinfo/wikitech-l

The extension maintainers, and active users and contributors, are on this list and will be able to help you.

Related extensions

 * JQuery Tab Container

Sites using this extension
If you use this extension, please add a link at the bottom of the list: You can also see a listing of active wikis that use Header Tabs here.
 * LexWiki
 * Venicewiki.org
 * Men of War - Wiki
 * The Music Snob
 * Dexid (Link takes you to a Semantic Form where tabs are in use)
 * Qualitypedia
 * FOSS4Trans Wiki
 * Wikitabs
 * center-of-excellence.dk
 * Semantic MediaWiki