Template:Template parameter value/doc: Difference between revisions

Content deleted Content added
No edit summary
No edit summary
Line 8:
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 {{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 parameters; i.e. it cannot get the first parameter of {{tl|Start date}} (the year). Make sure that you are listing the article where the template exists, not where it's transcluded to.
 
===Syntax===
: <code><nowiki>{{Template parameter value|ARTICLE|TEMPLATE|TEMPLATE-COUNT|PARAMETER|PARAMETER-COUNT}}</nowiki></code>
 
=== Examples ===
Line 18:
: {{Template parameter value|List of Lucifer episodes|Episode table|3|OriginalAirDate|24}}
 
; 1st2nd usage of |num_episodesarchiveurl= in the 1st usage of {<nowiki />{InfoboxSeries televisionoverview}} in [[LuciferList of Agents of (TVS.H.I.E.L.D. series)episodes]]
: <code><nowiki>{{Template parameter value|LuciferList (TVof series)Agents of S.H.I.E.L.D. episodes|InfoboxSeries televisionoverview||archiveurl|num_episodes2}}</nowiki></code>
: {{Template parameter value|LuciferList (TVof series)Agents of S.H.I.E.L.D. episodes|InfoboxSeries televisionoverview||archiveurl|num_episodes2}}
 
; 1st usage of |LineColor= in the 2nd usage of {<nowiki />{Episode list}} in [[Vikings (season 4)]]
: <code><nowiki>{{Template parameter value|Vikings (season 4)|Episode list|2|LineColor}}</nowiki></code>
: {{Template parameter value|Vikings (season 4)|Episode list|2|LineColor}}
 
; 1st usage of |num_episodes= in the 1st usage of {<nowiki />{Infobox television}} in [[12 Monkeys (TV series)]]
: <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}}
 
== Parameters==
Line 43 ⟶ 51:
! 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) setsthis the value to 1parameter.<br />Exclusion means that the third parameter will become the named parameter, which will cause the template to simplynot work (return blank).<br />''Example:'' 24
| TextNumber
| Optional setting<br />Required inclusion (see exampleexamples above)
|-
! 4
| Named parameter
| The named parameter in the template that holds the required value.<br />''Example:'' OriginalAirDate
| Text
| Required
Line 55 ⟶ 63:
! 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 (see example above).<br />''Example:'' 3
| TextNumber
| Optional (see examples above)
|}