FANDOM


Information icon-grey
This is a documentation subpage for Template:Switch infobox2.
It contains usage information, categories, and other content that is not part of the original template page.

This template is used to separate different information on a specific page with different condition (for example, a NPC before and after a quest).

After the insertion of the template, there will be different buttons stating the possible conditions of that page. When clicked on different conditions, the page will display different information.

Usage

{{switch infobox
  | text1 =
  | item1 =
  | text2 =
  | item2 =
  | text3 =
  | item3 =
}}

When using more than one switch infobox on a single page you will need to utilise the multi parameter. If this is not done, it will cause errors with the buttons triggering switches in different infoboxes. The multi parameter in the first use of switch infobox should be set to 1, the next to 2 and so on. If the first is not set to 1 it will prevent the stylesheet loading. If there is only one switch infobox in use on the page, the multi parameter should be removed.

Note: The counter for multi is also used by Template:Switch inline. This means if both are being used on the same page then the multi parameter should be filled out for both with non-conflicting values.

{{switch infobox
  | multi = 1
  | text1 =
  | item1 =
  | text2 =
  | item2 =
}}

...

{{switch infobox
  | multi = 2
  | text1 =
  | item1 =
  | text2 =
  | item2 =
}}

When this is used for NPC infoboxes there will often be a chathead to switch at the same time. Chatheads can be added to each switch using the chatheadX parameter where X is the number of the switch.

{{switch infobox
  | text1 =
  | chathead1
  | item1 =
  | text2 =
  | chathead2 =
  | item2 =
}}

Setup

This template uses html which is embedded through use of the int magic word and verbatim tags. The relevant pages can be found through Special:PrefixIndex/MediaWiki:Tabber-. The pages follow the format tabber-(type)-(num) where (type) refers the the part of the template it's used for and (num) refers to the sequence in which they should be embedded. If the page does not have a number it is the base page to which the numbered pages are embedded onto.

For example MediaWiki:Tabber-label-1, MediaWiki:Tabber-label-2 and MediaWiki:Tabber-label-3 are embedded onto MediaWiki:Tabber-label which is in turn embedded into this template.

The main stylesheet for this template is found at MediaWiki:Switch.css which is also embedded into the template through MediaWiki:Tabber-import. It is set up this way to make sure the template works in Wikiamobile. There is also a small script located on MediaWiki:Tabber-import to make sure them template works for viewers using Internet Explorer 8. Versions of Internet Explorer below 8 are not actively supported or tested on. There may be additional CSS in the normal MediaWiki CSS files, see MediaWiki:Common.css, MediaWiki:Wikia.css and MediaWiki:Monobook.css for more details.

Community content is available under CC-BY-SA unless otherwise noted.