Template:Tl2/doc: Difference between revisions
More actions
←Created page with '{{Documentation subpage}} This is the {{tl2|tl2}} template. ---- Same as {{tl|tl}} except adds <nowiki><code></code></nowiki> around it and allows for one or tw...' |
Use {{TemplateBox}} |
||
| Line 1: | Line 1: | ||
{{Documentation subpage}} | {{Documentation subpage}} | ||
<!-- Add categories where indicated at the bottom of this page and interwikis at Wikidata --> | |||
{{Uses TemplateStyles|Template:Nowrap/styles.css}} | |||
{{TemplateBox | |||
| name = tl2 | |||
| desc-en = | |||
This is the {{tl2|tl2}} template. | This is the {{tl2|tl2}} template. | ||
---- | ---- | ||
Same as {{tl|tl}} except adds < | {{nobold|1= | ||
Same as {{tl|tl}} except adds <syntaxhighlight inline lang="html"><code class="nowrap">...</code></syntaxhighlight> around it and allows for one or two parameters. | |||
}} | |||
| namespace = all | |||
| usergroup = all | |||
| seealso = | |||
'''Comparison:''' | '''Comparison:''' | ||
* | * {{tlx|tl|template}} → {{tl|template}} | ||
* | * {{tlx|tl2|template}} → {{tl2|template}} | ||
'''Comparison 2:''' | '''Comparison 2:''' | ||
* | * {{tlx|tl|template|arg1|arg2}} → {{tl|template|arg1|arg2}} | ||
* | * {{tlx|tl2|template|arg1|arg2}} → {{tl2|template|arg1|arg2}} | ||
| i18n-method = - | |||
| print = line | |||
| useTemplateData = only | |||
| desc-td-en = Template link with parameters and interwiki | |||
| 1 = 1 | |||
| 1label-en = Template | |||
| 1d-en = Linked template name | |||
| 1stat = required | |||
| 1type = wiki-template-name | |||
| 2 = 2 | |||
| 2label-en = Parameter 1 | |||
| 2d-en = First parameter value | |||
| 2stat = optional | |||
| 24type = string | |||
| 3 = 3 | |||
| 3label-en = Parameter 2 | |||
| 3d-en = Second parameter value | |||
| 3stat = optional | |||
| 3type = string | |||
| 4 = SISTER | |||
| 4label-en = Interwiki Prefix | |||
| 4d-en = The interwiki prefix (see: “Special:Interwiki” for a list of valid prefixes) | |||
| 4stat = optional- | |||
| 4type = string | |||
| 5 = LANG | |||
| 5label-en = Interlanguage Prefix | |||
| 5d-en = The interwiki language prefix (see: “Special:Interwiki” for a list of valid prefixes) | |||
| 5stat = optional- | |||
| 5type = string | |||
}} | |||
{{Commons:Link templates/Template links}} | {{Commons:Link templates/Template links}} | ||
<includeonly> | <includeonly>{{Sandbox other|| | ||
[[Category:Internal link templates]] | [[Category:Internal template-link templates]] | ||
</includeonly> | }}</includeonly> | ||
Revision as of 18:57, 26 June 2021
This is the {{tl2}} template.
Same as {{Tl}} except adds <code class="nowrap">...</code> around it and allows for one or two parameters.
Usage
{{tl2 |1= |2= |3= }}
Template parameters
- 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 with parameters and interwiki
| Parameter | Description | Type | Status | |
|---|---|---|---|---|
| Template | 1 | Linked template name | Template | required |
| Parameter 1 | 2 | First parameter value | Unknown | optional |
| Parameter 2 | 3 | Second parameter value | String | optional |
| Interlanguage Prefix | LANG | The interwiki language prefix (see: “Special:Interwiki” for a list of valid prefixes) | String | optional |
| Interwiki Prefix | SISTER | The interwiki prefix (see: “Special:Interwiki” for a list of valid prefixes) | String | optional |
Additional information
The template is intended to be used in the following namespaces: all namespaces
The template is intended to be used by the following user groups: all users
See also
Localization
This template is not intended to be localized.
{{Commons:Link templates/Template links}}