FANDOM


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

This is an alternative to User:Cqm/switch infobox. Instead of switching the entire infobox, this allows switching of one or more parameters. However, this template is messier when looking at the page source so if there are lots of switches being done through the infobox it is better to use the proper switch infobox template.

This template is to be used in conjunction with User:Cqm/switch content.

Usage

{{switch inline
  | text1 =
  | text2 =
  | text3 =
  | contents = {{switch content| hello | how are you | goodbye }}
}}

When using more than one switch inline 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 inline 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 inline in use on the page, the multi parameter should be removed.

Note: The counter for multi is also used by Template:Switch infobox. 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 inline
  | multi = 1
  | text1 =
  | text2 =
  | contents = {{switch content| 1 | 2 }}
}}

...

{{switch inline
  | multi = 1
  | text1 =
  | text2 =
  | contents = {{switch content| 1 | 2 }}
}}

Setup

See Template:Switch infobox#Setup.
Community content is available under CC-BY-SA unless otherwise noted.