Template documentation follows
Note: the template above may sometimes be partially or fully invisible.
Visit Template:Season_switch/doc to edit this documentation. (How does this work?)

This template is intended to be used within infobox templates, e.g. {{character}} and {{cast}}. It converts user value for "season" parameter to linked text.

Usage

To add this functionality to an infobox, add format field within season's data tags, e.g.:

<data source="season">
	<label>Season</label>
	<format>{{season switch|{{{season|}}}}}</format>
</data>


On article pages, users fill the infobox as normal, i.e. "|season = <user value>". Behind the scenes, the infobox code takes the <user value> and sends it to this template. Then this template converts the <user value> to the standardized wikilinked season list displayed in the infoboxes.

Alternatively, instead of integrating the template call within the infobox code, user can call the template when filling out the infobox, i.e. "|season = {{season switch|<user value>}}".

Notes

  • With the exception of numbers and dashes, everything else is ignored within <user value>.
    • Season numbers can be written in a variety of formats, e.g. for season five, defined values include "5", "5th", "five", and "fifth".
    • Though unnecessary, spaces, commas, and/or other symbols can be used to separate multiple seasons, e.g. "3,5" and "3 & 5".
    • If the <user value> does not include any numbers, then season will not be displayed within infobox.
  • Dashes can be used to give a number range, e.g. "1-4" for seasons 1, 2, 3, and 4.
  • If user wants to override the use of this template (i.e. user wants a value for season other than those defined by this template), then write "override " at the start of <user value>, e.g. "override other season". The first nine characters, i.e. "override ", will be removed but otherwise <user value> will remain unedited.

Examples

Examples of what this template returns for various <user value>:

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