Template:Template parameter value/doc: Difference between revisions

Content deleted Content added
No edit summary
No edit summary
Line 6:
 
== Usage ==
The purpose of this template is to gain the value of a template's parameter (named parameteror numbered) in an article, for usage elsewhere. For example, gaining the value of the {{para|num_episodes}} parameter in the {{tl|Infobox television}} template in an article, to use in another article.
 
This template is case-sensitive; i.e. setting {{para|Viewers}} will not match {{para|viewers}}. This template also only works with named or numbered parameters; i.e. it cannotcan get the first parameter of {{tl|Start date}} (the year). This template is case-sensitive; i.e. setting {{para|Viewers}} will not match {{para|viewers}}. Make sure that you are listing the article where the template exists, not where it's transcluded to.
 
===Syntax===
Line 29:
: <code><nowiki>{{Template parameter value|12 Monkeys (TV series)|Infobox television||num_episodes}}</nowiki></code>
: {{Template parameter value|12 Monkeys (TV series)|Infobox television||num_episodes}}
 
; 3rd parameter in the 8th usage of {<nowiki />{Start date}} in [[The Big Bang Theory]]
: <code><nowiki>{{Template parameter value|The Big Bang Theory|Start date|8|3}}</nowiki></code>
: {{Template parameter value|The Big Bang Theory|Start date|8|3}}
 
== Parameters==
Line 37 ⟶ 41:
! style="width:15%" | Status
|-
! style="width:4%" | 1
! 1
| Article
| The article where the template and value exist.<br />''Example:'' List of Lucifer episodes
Line 45 ⟶ 49:
! 2
| Template
| The template where the value is held in the form of a named parameter.<br />''Example:'' Episode table
| Text
| Required
Line 51 ⟶ 55:
! 3
| Numbered usage of template
| How many usages of the above template are counted.<br />Setting to blank sets the value to 1; do ''not'' exclude this parameter.<br />Exclusion means that the third parameter will become the named/numbered parameter, which will cause the template to not work (return blank).<br />''Example:'' 24
| Number
| Optional setting<br />Required inclusion (see examples above)
|-
! 4
| Parameter
| Named parameter
| The named/numbered parameter in the template that holds the required value.<br />For a numbered parameter, for example, the 2nd numbered parameter will have an input of 2.<br />''Example:'' OriginalAirDate / 2
| Number / Text
| Required
|-
! 5
| Numbered usage of parameter
| How many usages of the above parameter are counted within the found template.<br />Setting to blank or excluding (exclusion allowed) sets the value to 1. Set to blank or 1 for a numbered parameter.<br />''Example:'' 3
| Number
| Optional (see examples above)
|}
 
<includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox | |
<!-- Categories below this line, please; interwikis at Wikidata -->