Jump to content

Template:Template parameter value/doc

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Alex 21 (talk | contribs) at 01:02, 23 June 2018. The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

Usage

The purpose of this template is to gain the value of a template's named parameter in an article, for usage elsewhere. For example, gaining the value of the |num_episodes= parameter in the {{Infobox television}} template in an article, to use in another article.

This template is case-sensitive; i.e. setting |Viewers= will not match |viewers=. This template also only works with named parameters; i.e. it cannot get the first parameter of {{Start date}} (the year). Make sure that you are listing the article where the template exists, not where it's transcluded to.

Syntax

{{Template parameter value|ARTICLE|TEMPLATE|TEMPLATE-COUNT|PARAMETER|PARAMETER-COUNT}}

Examples

24th usage of |OriginalAirDate= in the 3rd usage of {{Episode table}} in List of Lucifer episodes
{{Template parameter value|List of Lucifer episodes|Episode table|3|OriginalAirDate|24}}
May 14, 2018 (2018-05-14)
2nd usage of |archiveurl= in the 1st usage of {{Series overview}} in List of Agents of S.H.I.E.L.D. episodes
{{Template parameter value|List of Agents of S.H.I.E.L.D. episodes|Series overview||archiveurl|2}}
1st usage of |LineColor= in the 2nd usage of {{Episode list}} in Vikings (season 4)
{{Template parameter value|Vikings (season 4)|Episode list|2|LineColor}}
1st usage of |num_episodes= in the 1st usage of {{Infobox television}} in 12 Monkeys (TV series)
{{Template parameter value|12 Monkeys (TV series)|Infobox television||num_episodes}}
47

Parameters

Parameter Description Type Status
1 Article The article where the template and value exist.
Example: List of Lucifer episodes
Text Required
2 Template The template where the value is held in the form of a named parameter.
Example: Episode table
Text Required
3 Numbered usage of template How many usages of the above template are counted. Setting to blank sets the value to 1; do not exclude this parameter.
Exclusion means that the third parameter will become the named parameter, which will cause the template to not work (return blank).
Example: 24
Number Optional setting
Required inclusion (see examples above)
4 Named parameter The named parameter in the template that holds the required value.
Example: OriginalAirDate
Text Required
5 Numbered usage of parameter How many usages of the above parameter are counted within the found template. Setting to blank or excluding (exclusion allowed) sets the value to 1.
Example: 3
Number Optional (see examples above)