Template:Episode list/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 column for a given episode, 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. Empty cells will be automatically filled with TableTBA.

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):

TemplateData
{	"params": { "EpisodeNumber": { "label": "Episode number", "description": "A number representing the episode's order in the series. For example, the first episode would be 1 or 01, and so on. When defined, the specified number also generates a link anchor, prefixed by \"ep\"; for example, \"List of episodes\" or \"List of episodes\". In creating the anchor, the text specified for the number is treated literally: to generate the most straightforward versions of anchors as previously exemplified, specify only a number, omitting any use of formatting, including bold. For double-episodes where two numbers are listed and are separated by \"\", \" \", or \" \", the link anchor will be only the first number; that is, if the double episode spans episode numbers 87 and 88, then List of episodes will link directly to the episode.", "type": "number", "suggested": true },		"EpisodeNumber2": { "label": "Second episode number", "description": "A second episode number column. Useful for when a series aired in a different order, or only included certain episodes, etc. When used with multi-season series, this field is typically used to represent the episode's order in the season.", "type": "number" },		"Title": { "label": "Title", "description": "The title of the episode. The title will appear in \"quotes\" when rendered, so it is not necessary to place them in quotes beforehand. Only link to an episode article if it has already been created.", "type": "content", "required": true },		"RTitle": { "label": "Title reference, or title (raw)", "description": "Unformatted parameter that can be used to add a reference after \"Title\", or can be used as a \"raw title\" to replace \"Title\" completely. Future episodes should include a reference in this field to comply with Wikipedia:Verifiability.", "type": "content" },		"AltTitle": { "label": "Alternative title", "description": "An alternative title, such as the title of a foreign show's episode in its native language, or a title that was originally changed. It will be listed below Title and be presented in \"quotes\".", "type": "content" },		"RAltTitle": { "label": "Alternative title's reference, or alternative title (raw)", "description": "Unformatted parameter that can be used to add a reference after \"AltTitle\", or can be used as a \"raw title\" to replace \"AltTitle\" completely.", "type": "content" },		"Aux1": { "label": "Extra column 1", "description": "Unformatted parameter that can be used to add a reference after \"AltTitle\", or can be used as a \"raw title\" to replace \"AltTitle\" completely.", "type": "content" },		"DirectedBy": { "label": "Directed by", "description": "Name of the episode's director. May contain links.", "type": "content" },		"WrittenBy": { "label": "Written by", "description": "Primary writer(s) of the episode. May include links.", "type": "content" },		"Aux2": { "label": "Extra column 2", "description": "General purpose parameter. The meaning is specified by the column header.", "type": "content" },		"Aux3": { "label": "Extra column 3", "description": "General purpose parameter. The meaning is specified by the column header.", "type": "content" },		"OriginalAirDate": { "label": "Original air date", "description": "This is the date the episode first aired on TV, or is scheduled to air. formatted using use |df=y for day-first format; omit for month-first." },		"AltDate": { "label": "Second notable air date", "description": "The next notable air date, such as the first air date of an anime in English. Formatted per MOS:DATE. Do not use if OriginalAirDate is present." },		"ProdCode": { "label": "Production code", "description": "The production code in the series. When defined, this parameter also creates a link anchor, prefixed by \"pc\"; for example, \"List of episodes\".", "type": "string" },		"Viewers": { "label": "Number of viewers", "description": "Number of viewers who watched the episode. Should include a reference. The inclusion of viewer figures is supported by MOS:TV and provides encyclopaedic content beyond what might normally be found in a TV guide. It is therefore desirable to include referenced ratings information in an episode list. \"Final\" viewer numbers should be used.", "type": "content", "suggested": true },		"Aux4": { "label": "Extra column 4", "description": "General purpose parameter. The meaning is specified by the column header.", "type": "content" },		"ShortSummary": { "label": "Short summary", "description": "A short 100–200 word plot summary of the episode. Make summaries specific to that episode (as in, a description that would normally not be confused with another episode). Episode summaries must not be copied from other sources, as this violates WP:COPYRIGHT. Further guidance on plot summaries may be found at WP:TVPLOT. Leaving this parameter empty will result in the summary row not appearing for this episode.", "type": "content" },		"LineColor": { "label": "Border color", "description": "Not usually needed. Colors the separator line between episode entries. If not defined the color defaults to \"#CCCCFF\" and the article populates Category:Episode list using the default LineColor. Use of \"#\", or anything but a valid hex code will result in an invalid syntax.", "example": "\"00ff00\" is bright green.", "type": "string" },		"TopColor": { "label": "Top color", "description": "Colors the main row of information (that is, not the ShortSummary row). The excessive use of the parameter is discouraged by Wikipedia's guideline on styles and markup options. Articles using this parameter are in Category:Episode lists with row deviations.", "example": "\"00ff00\" is bright green.", "type": "string", "default": "If not defined, it defaults to the wikitable standard background shading of \"#F9F9F9\", except when ShortSummary is used, and then it defaults to \"#f2f2f2\"." },		"RowColor": { "label": "Row banding color override", "description": "This parameter is a \"switch\" that must only be defined when the EpisodeNumber= entry is not a regular number (e.g. \"12–13\" for two episodes described in one table entry). When transcluding the table from a season article into a main episode list article, irregular EpisodeNumber= entries break up the striping effect the template introduces. If the first episode number is even, define RowColor= as On. If the first episode number is odd, define RowColor= as Off. All further uses of Template:Episode list in the table must also have the RowColor= parameters defined to alternate between Off and On to avoid further breakages in the striping.", "example": "\"On\", \"on\", \"Yes\", \"yes\", \"Y\", or \"y\"; \"Off\", \"off\", \"No\", \"no\", \"N\", \"n\"", "type": "boolean" }	},	"description": "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 column for a given episode, 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. Empty cells will be automatically filled with . It is used within .", "paramOrder": [ "EpisodeNumber", "EpisodeNumber2", "Title", "RTitle", "AltTitle", "RAltTitle", "Aux1", "DirectedBy", "WrittenBy", "Aux2", "Aux3", "OriginalAirDate", "AltDate", "ProdCode", "Viewers", "Aux4", "ShortSummary", "LineColor", "TopColor", "RowColor" ] }

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. Empty cells will be automatically filled with TableTBA.

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 must first create the "header" of the WikiTable. To do so, you should use Episode table. Please refer to that template's documentation for an in-depth description of how to use each of its parameters. An example here, 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, generally broken by season or years. See Manual of Style/Television for more info regarding when to split.

The name of the sublist should correspond with the article title where the episode table is located. For example, if you were working on List of Lost episodes, you would split it into Lost (season 1) and Lost (season 2), and each episode on the sublist would use and  respectively.

When transcluded onto any other article, 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 Lost 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; this is necessary when transcluding an article. If you tried to transclude Lost (season 1), without using the colon, you would get, a redlink to a nonexistent template.

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

If the following code is on Lost (season 4): &lt;onlyinclude> {{Episode table |background=#00549A |overall= |season= |title= |director= |writer= |aux2= |aux2T=Featured character(s) |airdate= |viewers= |country=U.S. |episodes= {{Episode list/sublist|Lost (season 4) }} {{Episode list/sublist|Lost (season 4) }} {{Episode list/sublist|Lost (season 4) }}
 * RowColor       = Y
 * EpisodeNumber  = 73
 * EpisodeNumber2 = 1
 * Title          = The Beginning of the End
 * DirectedBy     = Jack Bender
 * WrittenBy      = Damon Lindelof & Carlton Cuse
 * Aux2           = Hurley
 * OriginalAirDate = {{Start date|2008|1|31}}
 * Viewers        = 17.77&lt;ref name="rankings"/>
 * ShortSummary   = The survivors of 815 split into two groups led by Jack and Locke.
 * LineColor      = 00549A
 * RowColor       = N
 * EpisodeNumber  = 74
 * EpisodeNumber2 = 2
 * Title          = Confirmed Dead
 * DirectedBy     = Stephen Williams
 * WrittenBy      = Drew Goddard & Brian K. Vaughan
 * Aux2           = Faraday
 * OriginalAirDate = {{Start date|2008|2|7}}
 * Viewers        = 16.96&lt;ref name="rankings"/>
 * ShortSummary   = A science team from the freighter arrives on the island.
 * LineColor      = 00549A
 * RowColor       = Y
 * EpisodeNumber  = 75
 * EpisodeNumber2 = 3
 * Title          = The Economist
 * RTitle         = &lt;ref name="episode titles"/>
 * DirectedBy     =
 * WrittenBy      =
 * Aux2           =
 * OriginalAirDate = {{Start date|2008|2|14}}&lt;ref name="TV Guide"/>
 * Viewers        =
 * ShortSummary   = Locke's group settles into the Barracks.&lt;ref name="TV Guide"/>
 * LineColor      = 00549A
 * }&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> {{Episode table

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.

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.

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