Template:Episode list/sandbox/doc

This template creates a table row, for use in a list of episodes, primarily for television. The number, and use, of columns a table has, is defined by the beginning wikitext of that table (further explained below), and is not defined by this template. In order for this template to provide a table row for a given article, parameters must either be included, or excluded. An included parameter, although empty, will provide a cell for that field (and thus column), while excluding a parameter will not provide a cell for that field.

Parameters
This is where information from the template is placed when rendered (LineColor, TopColor, and RowColor are not shown, since there's no text to display):

Using the template
When using optional parameters (such as  or  ) only list the parameters that are being used, and adjust the table headers accordingly. This will help avoid confusion when one entry has a parameter filled out, and another does not. A table cell will be open for each listed parameter, whether it is filled out or not.

To apply an entry to an episode listing, add this template where the episode would go in the List of episodes. The full syntax is as follows, remove the parameters that are not being used in the table:

Because this is only part of a WikiTable, you first must "open" the WikiTable. You need to edit this example according to the optional parameters that you want to show in your table, ensuring that the code used complies with MOS:ACCESS requirements. An explanation of how to do this is detailed at WP:DTT. For example, to create a list with only ,  ,  ,  , and   parameters, open the table as follows:

Examples
The above code would appear as follows:

A more complex case would look like the following:

Sublists
Occasionally, when dealing with a very long series, you may wish to break the list up into separate sublists. When doing so, the list should be broken at season breaks, or otherwise years.

Sublists should be named as "List of X episodes (season y)", and transcluded onto the main list to prevent ending up with two lists of duplicate information. For sublist pages, you should use for each episode, where "List of X episodes" is the name of the main episode list. So, for instance, if you're working on List of Bleach episodes, you would split it into List of Bleach episodes (season 1) and List of Bleach episodes (season 2), and each episode on the sublist would use.

When transcluded onto the main list, this template removes any summaries, and alternates the background row color between light and dark gray, depending on the value of EpisodeNumber. Occasionally, a multi-part episode will skew the pattern between odd and even s, to rectify this, use the   parameter. A " " input will color the row dark gray, like an even number normally would, on the "List of X episodes" page, while a " " input will color the row light gray, like an odd number normally would.

For the purpose of transclusion, each sublist must make use of  tags, with the opening tag just before the WikiTable, and the closing tag at the very end of the table. This prevents the lead, external links, templates, categories, interwiki links, and all other unnecessary information from being transcluded onto the main list.

When transcluding onto the main list, you should make use of main. For example, referring to Bleach again, the main list would have the following code under the "Episode list" header:

Season 2
Note the colon (:) at the beginning of the transclusions (for example,  ...); this is necessary when transcluding an article. If you tried to transclude List of Bleach episodes (season 1), without using the colon, you would get, a redlink to a nonexistent template.

Examples
If the following code is on List of Lost episodes (season 3): &lt;onlyinclude> &lt;/onlyinclude>

If the following code is on List of Lost episodes (season 4): &lt;onlyinclude> &lt;/onlyinclude>

And if the following code is on List of Lost episodes:

Season 4
List of Lost episodes will appear as follows:
 * Season 3


 * Season 4

Tips
It may be helpful to include a hidden message that will appear when someone edits the article. Placed above the table headers and under the article section, such as:

==Episodes== &lt;onlyinclude> {| class="wikitable plainrowheaders"

This message won't be visible when normally viewing the article. A message such as this notes where one can get help for the template.

Microformat
For shows where each episode is from a different, single, specific place (for example, Time Team, one of the Aux fields can contain the coordinates, applied using coord.

Episode list templates

 * WikiProject Television/Episode lists
 * Template:Episode list
 * Template:S-Episode list
 * Template:Japanese episode list
 * Template:S-Japanese episode list
 * Template:Television needs episode list

Subpages
"Hacks" of this template, also known as "forks", are discouraged. Any discussion regarding forks should occur on this template's, not the fork's or article's, talk page.