Content deleted Content added
Expanded TemplateData |
Tom.Reding (talk | contribs) m →top: {{High-use}} |
||
(8 intermediate revisions by 4 users not shown) | |||
Line 1:
{{Documentation subpage}}
{{High-use}}
<!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) -->
{{shortcut|1=WP:TPU}}
Line 5 ⟶ 6:
== Usage ==
Example:
<div style="background:#ddd">
* {{tl|Infobox lighthouse}}/documentation: {{Slink|Template:Infobox_lighthouse|TemplateData}} → "''[https://bambots.brucemyers.com/TemplateParam.php?wiki=enwiki&template=Infobox+lighthouse Click here] to see a monthly parameter usage report ...''" → [https://bambots.brucemyers.com/TemplateParam.php?wiki=enwiki&template=Infobox+lighthouse].
</div>
===Parameters===
{{tj|Template parameter usage
| 1: <!-- template:name, default{{=}}pagename -->
| lc: <!-- yes/no -->
| label: <!-- keywords like "for", or free labeltext -->
}}
:All parameters are optional, and have a default
By default, the template links for the template page:
:<nowiki>{{Template parameter usage}}</nowiki> → {{Template parameter usage}} [for this page]
One can enter a template name:
:<nowiki>{{Template parameter usage|Infobox film}}</nowiki> → {{Template parameter usage|Infobox film}}
Optional:
* {{para|lc|yes}} for lowercase "
* Entering {{para|1|Template:Infobox film}} is accepted (namespace is removed). Editor friendly, using a positional parameter.
* {{para|label}} sets the visible text; it
::{{para|label}} default → {{Template parameter usage|1=Infobox film}}
::{{para|label|none}} → {{Template parameter usage|1=Infobox film|label=none}}
::{{para|label|for}} → {{Template parameter usage|1=Infobox film|label=for}}
::{{para|label|FooBar}} → {{Template parameter usage|1=Infobox film|label=FooBar}}
* {{para|based|yes}} adds the text "based on this TemplateData" to the end of the template (or "based on its TemplateData" if {{para|1}} is also used).
The template is included in transclusions of {{Tl|TemplateData header}}.
Line 59 ⟶ 74:
"description": "Enter any text here to make the template just the usage report link with the given custom text. Alternatively, enter \"none\" to include only the usage report link, or enter \"for\" to include only the usage report link followed by \"for <template name>\".",
"type": "string"
},
"based": {
"label": "Append \"based on this[/its] TemplateData\"",
"description": "Enter \"y\", \"yes\", \"true\", \"on\" or \"1\" here to append the text \"based on this TemplateData\" (or \"based on its TemplateData\" if \"Custom template\" is also used).",
"type": "line",
"autovalue": "y",
"example": "y"
}
},
Line 64 ⟶ 86:
"lc",
"1",
"label",
"based"
]
}
Line 71 ⟶ 94:
==See also==
* {{tl|TemplateData header}} -- major user of this template
* [[User:Bamyers99/TemplateParametersTool]] - the tool
<includeonly>{{sandbox other||
<!-- Categories below this line, please; interwikis at Wikidata -->
|