Misplaced Pages

Template:Episode table/doc: Difference between revisions

Article snapshot taken from Wikipedia with creative commons attribution-sharealike license. Give it a read and then ask your questions in the chat. We can research this topic together.
< Template:Episode table Browse history interactively← Previous editNext edit →Content deleted Content addedVisualWikitext
Revision as of 14:44, 2 July 2020 editAhecht (talk | contribs)Edit filter managers, Autopatrolled, Administrators64,868 edits Parameters: Note that this parameter is ignored by {{tl|Episode table/top}}.← Previous edit Revision as of 09:19, 4 August 2020 edit undoAlex 21 (talk | contribs)Extended confirmed users, Page movers, File movers, Pending changes reviewers, Template editors139,301 edits ParametersNext edit →
Line 225: Line 225:
! colspan="2" | Table caption ! colspan="2" | Table caption
| caption | caption
| A caption should be provided that describes in general the content of the table. e.g. <code>''NCIS'' season 11 episodes</code> | A caption should be provided that describes in general the content of the table, which uses {{tl|Sronly}} to not be displayed in a browser but be voiced by a screen reader for accessibility. e.g. <code>''NCIS'' season 11 episodes</code>
| Wikitext | Wikitext
| Required for accessibility | Required for accessibility

Revision as of 09:19, 4 August 2020

This is a documentation subpage for Template:Episode table.
It may contain usage information, categories and other content that is not part of the original template page.
WarningThis template is used on approximately 21,000 pages and changes may be widely noticed. Test changes in the template's /sandbox or /testcases subpages, or in your own user subpage. Consider discussing changes on the talk page before implementing them.
This template uses Lua:

Usage

The purpose of the {{Episode table}} template is to easily add header row to episode tables for television series, with up to 13 different columns, and optionally set the widths of these columns, and includes the {{Episode list}} template in the |episode= parameter. Cells are included by declaring the specific variable in one of two ways: title= includes the "Title" cell with no set width, and title=30 includes the "Title" cell with a width of 30%.

Adding the {{Episode list}} template in the |episode= parameter effectively doubles the post-expand include size of those templates. For shows with many episodes or seasons, to avoid errors, use {{Episode table/top}} and {{Episode table/bottom}} to surround the {{Episode list}} templates instead (note that the |anchor= parameter will not work with this method). You can further reduce the include size by directly invoking the modules with {{#invoke:Episode table|top}}, {{#invoke:Episode list|list}}, and {{#invoke:Episode table|bottom}}.

Syntax

Parameters
{{Episode table
|caption      = TEXT
|background   = COLOR
|total_width  = WIDTH
|overall      = WIDTH
|series       = WIDTH
|season       = WIDTH
|title        = WIDTH
|aux1         = WIDTH
|director     = WIDTH
|writer       = WIDTH
|aux2         = WIDTH
|aux3         = WIDTH
|airdate      = WIDTH
|altdate      = WIDTH
|prodcode     = WIDTH
|viewers      = WIDTH
|aux4         = WIDTH
|country      = COUNTRY
|released     = TEXT
|viewers_type = TEXT
|overallT     = TEXT
|seriesT      = TEXT
|seasonT      = TEXT
|titleT       = TEXT
|aux1T        = TEXT
|directorT    = TEXT
|writerT      = TEXT
|aux2T        = TEXT
|aux3T        = TEXT
|airdateT     = TEXT
|altdateT     = TEXT
|prodcodeT    = TEXT
|viewersT     = TEXT
|aux4T        = TEXT
|overallR     = REFERENCE
|seriesR      = REFERENCE
|seasonR      = REFERENCE
|titleR       = REFERENCE
|aux1R        = REFERENCE
|directorR    = REFERENCE
|writerR      = REFERENCE
|aux2R        = REFERENCE
|aux3R        = REFERENCE
|airdateR     = REFERENCE
|altdateR     = REFERENCE
|prodcodeR    = REFERENCE
|viewersR     = REFERENCE
|aux4R        = REFERENCE
|episodes     = EPISODE LISTS/PART ROWS
}}

Examples

Standard columns:

{{Episode table|caption=This is a caption|background=#B40000 |overall=5 |season=5 |title=17 |director=11 |writer=37 |airdate=10 |prodcode=6 |viewers=9 |country=U.S.}}

This is a caption
No.
overall
No. in
season
TitleDirected byWritten byOriginal air dateProd.
code
U.S. viewers
(millions)

All columns:

{{Episode table |overall= |season= |title= |aux1= |director= |writer= |aux2= |aux3= |airdate= |altdate= |prodcode= |viewers= |aux4= |country= |aux1T=Foreign title |aux2T=Guest writer |aux3T=Featured character |aux4T=Online viewers |altdateT=UK airdate}}

No.
overall
No. in
season
TitleForeign titleDirected byWritten byGuest writerFeatured characterOriginal air dateUK airdateProd.
code
Viewers
(millions)
Online viewers

With {{Episode list}}:
Code
{{Episode table |background = #005F6C |overall = 6 |series = 6 |title = 20 |director = 14 |writer = 15 |airdate = 16 |prodcode = 8 |viewers = 9 |aux4 = 6 |country = UK |overallT = Story |seriesT = Episode |aux4T = AI |aux4R = {{Dummy reference}} |episodes =
{{Episode list
 |EpisodeNumber = 203
 |EpisodeNumber2 = 1
 |Title = ]
 |DirectedBy = Adam Smith
 |WrittenBy = ]
 |OriginalAirDate = {{Start date|2010|4|3|df=y}}
 |ProdCode = 1.1
 |Viewers = 10.09
 |Aux4 = 86
 |LineColor = 005F6C
}}
{{Episode list
 |EpisodeNumber = 204
 |EpisodeNumber2 = 2
 |Title = ]
 |DirectedBy = ]
 |WrittenBy = Steven Moffat
 |OriginalAirDate = {{Start date|2010|4|10|df=y}}
 |ProdCode = 1.2
 |Viewers = 8.42
 |Aux4 = 86
 |LineColor = 005F6C
}}
}}
StoryEpisodeTitleDirected byWritten byOriginal air dateProd.
code
UK viewers
(millions)
AI 
2031"The Eleventh Hour"Adam SmithSteven Moffat3 April 2010 (2010-04-03)1.110.0986
2042"The Beast Below"Andrew GunnSteven Moffat10 April 2010 (2010-04-10)1.28.4286
With {{Episode list}}, using {{Episode table/top}} and {{Episode table/bottom}}:
Code
{{Episode table/top|background = #005F6C |overall = 6 |series = 6 |title = 20 |director = 14 |writer = 15 |airdate = 16 |prodcode = 8 |viewers = 9 |aux4 = 6 |country = UK |overallT = Story |seriesT = Episode |aux4T = AI |aux4R = {{Dummy reference}} }}
{{Episode list
 |EpisodeNumber = 203
 |EpisodeNumber2 = 1
 |Title = ]
 |DirectedBy = Adam Smith
 |WrittenBy = ]
 |OriginalAirDate = {{Start date|2010|4|3|df=y}}
 |ProdCode = 1.1
 |Viewers = 10.09
 |Aux4 = 86
 |LineColor = 005F6C
}}
{{Episode list
 |EpisodeNumber = 204
 |EpisodeNumber2 = 2
 |Title = ]
 |DirectedBy = ]
 |WrittenBy = Steven Moffat
 |OriginalAirDate = {{Start date|2010|4|10|df=y}}
 |ProdCode = 1.2
 |Viewers = 8.42
 |Aux4 = 86
 |LineColor = 005F6C
}}
{{Episode table/bottom}}

Template:Episode table/top

2031"The Eleventh Hour"Adam SmithSteven Moffat3 April 2010 (2010-04-03)1.110.0986 2042"The Beast Below"Andrew GunnSteven Moffat10 April 2010 (2010-04-10)1.28.4286

Template:Episode table/bottom


Parted seasons

For seasons which have been split into parts, use {{Episode table/part}}, as per the examples below. The part row has a HTML ID attribute applied to it, equal to the text displayed; i.e. the ID attributes of the following examples will be "Part 1" and "Athelstan's Journal".

{{Episode table/part|p=1|c=#183E54}}

No.
overall
No. in
season
TitleDirected byWritten byOriginal air dateU.S. viewers
(millions)
'

{{Episode table/part|p=Athelstan's Journal|c=#061453|nopart=y}}

No.TitleDirected byWritten byOriginal air dateLength
(minutes)
'

Parameters

Each cell parameter has an alias to match the parameters used in {{Episode list}}. In the Cell Inclusion & Widths rows, the original parameter is listed, followed by its episode-list alias. This means that this:

{{Episode table |background=#B40000 |overall=5 |season=5 |title=17 |director=11 |writer=37 |airdate=10 |prodcode=6 |viewers=9 |country=U.S.}}

will produce exactly the same as this:

{{Episode table |background=#B40000 |EpisodeNumber=5 |EpisodeNumber2=5 |Title=17 |DirectedBy=11 |WrittenBy=37 |OriginalAirDate=10 |ProdCode=6 |Viewers=9 |country=U.S.}}
Template parameters
Parameter Description Type Status
Table caption caption A caption should be provided that describes in general the content of the table, which uses {{Sronly}} to not be displayed in a browser but be voiced by a screen reader for accessibility. e.g. NCIS season 11 episodes Wikitext Required for accessibility
Background color background The background color of the header row. If no color is specified, the background defaults to #CCCCFF.
Format: white / #FFFFFF
String Optional
Total width total_width Table width defaults to 100%. For tables that are less than 100%, set this field as necessary. Set to "auto" to remove the set width and allow the table to display naturally.
Format: 75
Number Optional
Anchor anchor In {{Episode list}}, |EpisodeNumber= is a number representing the episode's order in the series. For example, the first episode would be 1. When defined, the specified number also generates a link anchor, prefixed by "ep"; for example, "]"; see more at Template:Episode list § EpisodeNumber. In the case of multiple tables with the same anchored episode number, the anchor can be made unique with the |anchor= parameter in the call of {{Episode table}}. For example, if |anchor= in this template is set to "Minisodes", then the anchor will be "]". Note that this parameter is ignored by {{Episode table/top}}. Wikitext Optional
Cell Inclusion & Widths* Overall Number overall
EpisodeNumber
The inclusion (and optionally the width) of the "No." / "No. overall" cell.
Use |forceoverall=y to force this column to display "No. overall" when season/series is not set.
Format: 10 / <blank>
Number Optional
Season season
EpisodeNumber2
The inclusion (and optionally the width) of the "No. in season" cell.
(Inclusion will set "No." cell to "No. overall" if overallT is unset.)
Format: 10 / <blank>
Note: "series" and "season" cannot be included in the same table.
Number Optional
Series series
EpisodeNumber2Series
The inclusion (and optionally the width) of the "No. in series" cell.
(Inclusion will set "No." cell to "No. overall" if overallT is unset.)
Format: 10 / <blank>
Note: "series" and "season" cannot be included in the same table.
Number Optional
Title title
Title
The inclusion (and optionally the width) of the "Title" cell.
Format: 10 / <blank>
Number Optional
Aux1 aux1
Aux1
The inclusion (and optionally the width) of the "Aux1" cell.
Format: 10 / <blank>
Number Optional
Director director
DirectedBy
The inclusion (and optionally the width) of the "Directed by" cell.
Format: 10 / <blank>
Number Optional
Writer writer
WrittenBy
The inclusion (and optionally the width) of the "Written by" cell.
Format: 10 / <blank>
Number Optional
Aux2 aux2
Aux2
The inclusion (and optionally the width) of the "Aux2" cell.
Format: 10 / <blank>
Number Optional
Aux3 aux3
Aux3
The inclusion (and optionally the width) of the "Aux3" cell.
Format: 10 / <blank>
Number Optional
Air Date airdate
OriginalAirDate
The inclusion (and optionally the width) of the "Original air date" cell.
Format: 10 / <blank>
Number Optional
Alternate Air Date altdate
AltDate
The inclusion (and optionally the width) of the "Alternate Air Date" cell.
Format: 10 / <blank>
Number Optional
Production Code prodcode
ProdCode
The inclusion (and optionally the width) of the "Production code" cell.
Format: 10 / <blank>
Number Optional
Viewers viewers
Viewers
The inclusion (and optionally the width) of the "Viewers" cell.
Format: 10 / <blank>
Number Optional
Aux4 aux4
Aux4
The inclusion (and optionally the width) of the "Aux4" cell.
Format: 10 / <blank>
Number Optional
Content Country country The series' originating country; displayed before "viewers".
(Exclusion capitalized "Viewers"; inclusion un-capitalizes "viewers".)
Format: U.S.
String Optional / Unrequired when viewers is not set
Released/Aired released Determines whether the episodes were released online or aired. Changes the "Original air date" cell to "Original release date".
Format: y
String Optional
Viewers type viewers_type The numeric format that viewers are grouped within the episode table. Set to "millions" by default. Including the parameter but leaving it blank will disclude the bracketed format.
Format: thousands
String Optional
Variable Content {variable}T Custom content of any cell (e.g. overallT, titleT).
Format: Any string
String Optional / Required when aux{1-4} and altdate set
Reference {variable}R Reference for any cell (e.g. overallR, titleR). If Misplaced Pages's link colours are not WCAG 2 AAA Compliant with the background colour, {{Episode table/ref}} is used to provide the reference with a compliant background colour.
Format: Reference
Reference Optional
Episodes episodes An infinite number of consecutive episode rows.
Format: {{Episode list}} or {{Episode table/part}}
Template Required when using {{Episode list}}
Don't Close dontclose Set this parameter to "y" to be able to close the initial wikicode declaration of the episode table, but to be able to continue displaying the separate episode rows after the header but outside of the initial declaration. Particularly useful for when the individual rows have to be transcluded outside of the article and thus must be outside of a template. To close the initial declaration, </table> must be used. Text Optional

*: These variables can be included but not set to a value, e.g. |title=, which will include the cell but not set a width to it.

Tracking category

See also