Difference between revisions of "Module:Infobox television season name/doc"
Jump to navigation
Jump to search
test>Gonnym (→Usage) |
test>Gonnym |
||
| Line 1: | Line 1: | ||
<!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) --> | <!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) --> | ||
| − | {{Lua|Module:Arguments|Module:List}} | + | {{Lua|Module:Arguments|Module:List|Module:String}} |
'''Module:Infobox television season name''' is used to validate or create a formatted season link for use in [[Template:Infobox television season]]. | '''Module:Infobox television season name''' is used to validate or create a formatted season link for use in [[Template:Infobox television season]]. | ||
| Line 12: | Line 12: | ||
* {{Mlx|{{BASEPAGENAME}}|getSeasonWord}} | * {{Mlx|{{BASEPAGENAME}}|getSeasonWord}} | ||
* {{Mlx|{{BASEPAGENAME}}|getInfoboxSubHeader}} | * {{Mlx|{{BASEPAGENAME}}|getInfoboxSubHeader}} | ||
| + | * {{Mlx|{{BASEPAGENAME}}|getListOfEpisodes}} | ||
== Parameter list == | == Parameter list == | ||
| Line 53: | Line 54: | ||
! scope="row" | <code>getInfoboxSubHeader</code> | ! scope="row" | <code>getInfoboxSubHeader</code> | ||
| Returns the relevant text for the sub-header field. The text is returned in the format of <code>Season #</code> or <code>Series #</code>, depending on either what the article disambiguation uses, or on manually entered parameters of the infobox. | | Returns the relevant text for the sub-header field. The text is returned in the format of <code>Season #</code> or <code>Series #</code>, depending on either what the article disambiguation uses, or on manually entered parameters of the infobox. | ||
| + | |- | ||
| + | ! scope="row" | <code>getListOfEpisodes</code> | ||
| + | | Returns the formatted link to the list of episodes article in the style of: <code><nowiki>[[List of <series name> <disambiguation if present> episodes <seasons if present>|List of ''<series name>'' episodes <seasons if present>]]</nowiki></code>. The link will only return if the page exists. | ||
|} | |} | ||
Revision as of 00:40, 15 July 2020
| This module depends on the following other modules: |
Module:Infobox television season name is used to validate or create a formatted season link for use in Template:Infobox television season.
Contents
Usage
{{#invoke:Infobox television season name|checkAll}}{{#invoke:Infobox television season name|checkPrevSeason}}{{#invoke:Infobox television season name|checkNextSeason}}{{#invoke:Infobox television season name|getPrevSeasonArticle}}{{#invoke:Infobox television season name|getNextSeasonArticle}}{{#invoke:Infobox television season name|getSeasonWord}}{{#invoke:Infobox television season name|getInfoboxSubHeader}}{{#invoke:Infobox television season name|getListOfEpisodes}}
Parameter list
The following parameters can be used as named parameters or nameless positional parameters.
| Parameter | Explanation | Status |
|---|---|---|
title
|
The title of TV program. If not supplied, will use the article title. | optional |
Function list
| Function | Explanation |
|---|---|
checkAll
|
Checks if the next or previous season have a created article or redirect. |
checkPrevSeason
|
Checks if the previous season has a created article or redirect. |
checkNextSeason
|
Checks if the next season has a created article or redirect. |
getPrevSeasonArticle
|
Retrieves the previous season article title. |
getNextSeasonArticle
|
Retrieves the next season article title. |
getSeasonWord
|
Returns either the word "season" or "series" as used in the disambiguation of the article title. |
getInfoboxSubHeader
|
Returns the relevant text for the sub-header field. The text is returned in the format of Season # or Series #, depending on either what the article disambiguation uses, or on manually entered parameters of the infobox.
|
getListOfEpisodes
|
Returns the formatted link to the list of episodes article in the style of: [[List of <series name> <disambiguation if present> episodes <seasons if present>|List of ''<series name>'' episodes <seasons if present>]]. The link will only return if the page exists.
|
Examples
checkAll
- Code:
{{#invoke:Infobox television season name|checkAll|title=Dallas (1978 TV series, season 7)}} - Produces:
getPrevSeasonArticle
- Code:
{{#invoke:Infobox television season name|getPrevSeasonArticle|title=Dallas (1978 TV series, season 7)}} - Produces:
Season 6
getNextSeasonArticle
- Code:
{{#invoke:Infobox television season name|getNextSeasonArticle|title=Lost (season 3)}} - Produces:
Season 4