Template:Tld/doc: Difference between revisions
More actions
Add {{Uses TemplateStyles}} |
Update {{Uses TemplateStyles}} |
||
| Line 1: | Line 1: | ||
{{Documentation subpage}} | {{Documentation subpage}} | ||
<!-- Add categories where indicated at the bottom of this page and interwikis at Wikidata --> | <!-- Add categories where indicated at the bottom of this page and interwikis at Wikidata --> | ||
{{Uses TemplateStyles|Template:Mono/styles.css}} | {{Uses TemplateStyles|Template:Mono/styles.css|Template:Nowrap/styles.css}} | ||
This is the {{tld|tld}} template. | This is the {{tld|tld}} template. | ||
Revision as of 16:36, 25 June 2021
This is the {{tld}} template.
This template works almost exactly like {{tlc}}, see full documentation there.
But here is a short example:
{{tld|template name|parameters}}
Renders like this:
- {{template name|parameters}}
TemplateData
- TemplateData
TemplateData is a way to store information about template parameters (the description of those and of the whole template) for both humans and machines. It is used by VisualEditor and possibly other tools like Upload Wizard.
Existing template documentation
At Wikimedia Commons, it is recommended to use {{TemplateBox}} with either useTemplateData=1 or useTemplateData=only on the /doc subpage and transcluding it with {{Documentation}} into the template. <nowiki>-tags can be wrapped around the arguments, if required, to avoid templates being expanded.
Newly created template documentation and imports
Another option, especially for imported templates, or for users with JSON experience, is placing raw <templatedata>-tags into the Wikitext of the template, as described in various Wikipediae.
Wikipedia's help about TemplateData • Commons-specific information
Template link code with link
| Parameter | Description | Type | Status | |
|---|---|---|---|---|
| Nowrap? | nowrap | Whether to add “<span style="white-space: nowrap">”
| Boolean | optional |
| Template | 1 | Linked template name | Template | required |
| Parameter 1 | 2 | First parameter value | String | optional |
| Parameter 2 | 3 | Second parameter value | String | optional |
| Parameter 3 | 4 | Third parameter value | String | optional |
| Parameter 4 | 5 | Fourth parameter value | String | optional |
| Parameter 5 | 6 | Fifth parameter value | String | optional |
| Parameter 6 | 7 | Sixth parameter value | String | optional |
| Parameter 7 | 8 | Seventh parameter value | String | optional |
| Parameter 8 | 9 | Eighth parameter value | String | optional |