Fandom Developers Wiki
Advertisement

Tabber is a global Lua module to create mobile-compatible tabbers, like <tabber></tabber>.

Installation

Note: You should add the same import to MediaWiki:FandomMobile.css.

Usage

Every even argument is used as the tab's title, and its following argument is used as the tab's content. Example:

{{Tabber
| Tab 1
| Content of tab 1

| Tab 2
| Content of tab 2
}}


Compared to a regular tabber:

<tabber>
Tab 1=
Content of tab 1
|-|
Tab 2=
Content of tab 2
</tabber>

Content of tab 1

Content of tab 2

Notes

  • This module works by using portable infoboxes, whose panel and section tags work on both desktop and mobile, while regular tabbers only work on desktop. Functionally infobox tabbers and regular tabbers work the same, but notably tabs in an infobox will not contain data-hash attributes, which enables linking directly to specific tabs on the page like [[Page#Tab]]. The script InfoboxTabberLinks addresses this issue, but only on desktop.
  • Because of the differences in how unnamed and named parameters are treated in wikitext, characters like = and | within the template need to be substituted with the templates {{=}} and {{!}}. If you need to use a lot of equals signs (for example, with styles and classes), you can switch to using numbered named parameters instead, e.g. |1=Tab Name|2=Content.
  • Don't use it in a page without any other infobox before. FandomMobile will pick the first infobox in the article and display it at the top of the page.
Text above can be found here (edit)
Advertisement