Template:Episode Box/doc

Episode Box is an infobox used to briefly describe the essential details about episodes. It underwent a significant revision in March 2016 to make it more portable. While some of the formatting changed, very little of the functionality did — and no variables were killed in the name of portability. :)

However, due to a number of sub-templates which fill out some of the variables in the infobox automatically, the infobox might appear to have some flaws when seen on this page.

See Episode 22 for an example of how the template functions on the pages this template was meant to serve.

Syntax
The basic code to bring it up is this.

Examples

 * ...gives you the following...

Categorization and Interlanguage
This template attempts to generate categorization and interlanguage links for any pages on which it is included. The various aspects of this generation is described here, along with the cases where it is not attempted and ways to bypass it, if needed.

Note that this does not detail the categorization done by Romaji Templates.

Using the  parameter (first) or WhichSeason (second), the page will be placed into an Category:Episodes by Season subcategory. If neither value returns any result, no category will be added.
 * Season Categorization
 * If  is defined, it will always use the given value.
 * If  is not defined, it will attempt to pull the value from WhichSeason using either the   parameter or the , by checking the first word after the first space.

If the page is titled "Episode Special ZZZ", it will be placed into Category:Specials, with a sort key of "ZZZ". This only occurs with titles formatted exactly as specified, and other specials need to be placed into the category manually.
 * Specials Categorization

Using four checks, the page is potentially placed into Category:Filler Episodes. The template checks:
 * Filler Categorization
 * 1) If the  parameter contains the word "Chapter"
 * 2) If WC returns a value when given the episode number (second word in )
 * 3) If the first word of  is "Episode"
 * 4) If the second word is "Special"
 * 5) If the second word is "of"

If these checks all return false, the template checks that the episode number (second word in ) is less than or equal to episodes. If it is, the page is placed in the filler episodes category.

If the page name is formatted "ZZZ YYY", and YYY is a number, the template will automatically create interlanguage links to the Russian, Catalan, Italian, French, Brazilian Portuguese, Spanish, and Polish wikis. The value used instead of "Episode" is listed below.
 * Interlanguage Links
 * RU - Эпизод
 * CA - Episodi
 * IT - Episodio
 * FR - Épisode
 * PT - Episódio
 * ES - Episodio
 * PL - Odcinek

The automatic categorization of pages cannot be bypassed - if the page fits the conditions, it will be added by the template.
 * Bypasses

Interlanguage links, on the other hand, can be overruled by placing custom language links before the Episode Box template call. Note, however, that this should never be needed, and the Episode Box template should generally modified to create exceptions when necessary.

Dependencies
This template depends on a lot of other templates. A lot of them. It is inarguably the most complicated infobox on this wiki, and very easy to break. Probably only those with advanced coding skills should attempt to change it.
 * Romaji Templates, for use in crediting.
 * Template:Range, lists all ranges of arcs and sagas.
 * Template:WhichOpening, gives you the opening of the inscribed episode.
 * Template:WhichEnding, gives you the ending of the inscribed episode.
 * Template:WhichFormat, gives you the format of the inscribed episode.
 * Template:WhichSeason, gives you the season of the inscribed episode.
 * Template:WhichPiece, gives you the piece of the inscribed episode.
 * Template:WhichAnimeDate, gives you the airdate of the inscribed episode.