Content deleted Content added
No edit summary |
Tom.Reding (talk | contribs) m →top: {{High-use}} |
||
(21 intermediate revisions by 8 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:
The [https://bambots.brucemyers.com/TemplateParam.php Template Parameters tool] is available for viewing template parameter usage in articles. It works with [[Wikipedia:TemplateData|TemplateData]] to show the
== 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
One can enter a template name:
:<nowiki>{{Template
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
::{{para|label|none}} → {{Template
::{{para|label|for}} → {{Template
::{{para|label|FooBar}} → {{Template
* {{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}}
== Error reports ==
{{tl|Template
By default, it links a report for the template-page being viewed. To link a report for a different template-page, pass it as the first parameter:
:{{tlx|Template
:→ {{Template
The first character can be made lowercase to follow on at the end of a sentence:
:<code>Blah, {{tlp|Template
== TemplateData ==
{{TemplateData header}}
<templatedata>
{
"description": "Short line of text providing a link to a monthly parameter usage report for a template based on its TemplateData",
"format": "inline",
"params": {
"
"
"description": "Enter \"y\", \"yes\", \"true\", \"on\" or \"1\" here to make the text begin with a lowercase character.",
▲ }
"type": "line",
"autovalue": "y",
"example": "y"
},
"1": {
"label": "Custom template",
"description": "Enter any template here to change the usage report link to that of that template",
"type": "wiki-template-name",
"example": "Anchor"
},
"label": {
"label": "Custom text",
"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"
}
},
"paramOrder": [
"lc",
"1",
"label",
"based"
]
}
</templatedata>
==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 -->
|