Template:Tlx/doc
Appearance
This is a documentation subpage for Template:Tlx. It contains usage information, categories, and other content that is not part of the original template page. |
This template is used on approximately 248,000 pages. To avoid major disruption and server load, any changes should be tested in the template's /sandbox or /testcases subpages, or in your own user subpage. The tested changes can be added to this page in a single edit. Consider discussing changes on the talk page before implementing them. |
This template can only be edited by administrators because it is transcluded onto one or more cascade-protected pages. |
This template creates example usage syntax for a template, and links the name to the template page. The name is derived from "Template list expanded".
Up to 7 pass parameters (numbered) for the specified template are displayed as "placeholders", and more parameters are shown as "|...". An optional SISTER parameter can specify an interwiki prefix to link to another wiki. Examples:
Code | Result | Remark |
---|---|---|
{{Tlx|x0}}
|
{{x0}}
|
|
{{Tlx|x1|one}}
|
{{x1|one}}
|
|
{{Tlx|x2|one|two}}
|
{{x2|one|two}}
|
|
{{Tlx|x3|1|2|3}}
|
{{x3|1|2|3}}
|
|
{{Tlx|x4|1|2|3|4}}
|
{{x4|1|2|3|4}}
|
up to 7 parameters, then ... |
{{Tlx|x4|1|2|3|4}}
|
{{x4|1|2|3|4}}
|
| for more |
{{Tlx|x1|x=u}}
|
{{x1}}
|
= won't work |
{{Tlx|x1|x=u}}
|
{{x1|x=u}}
|
= is okay |
{{Tlx|x1|<nowiki>x=u</nowiki>}}
|
{{x1|x=u}}
|
sticky nowiki is okay |
{{Tlx|x2| |two}}
|
{{x2|two}}
|
empty won't work |
{{Tlx|x2| |two}}
|
{{x2| |two}}
|
  is okay |
{{Tlx|x2| |two}}
|
{{x2| |two}}
|
is okay |
{{Tlx|x2| | two}}
|
{{x2| | two}}
|
| is okay |
{{Tlx|x2| {{!}} two}}
|
{{x2| | two}}
|
{{!}} is dubious
|
{{Tlx|x2|2=|3=two}}
|
{{x2|two}}
|
empty really doesn't work |
{{Tlx|x2|3=two|2=one}}
|
{{x2|one|two}}
|
right to left okay |
{{Tlx|SISTER=en|x0}}
|
{{x0}}
|
in English Wikipedia |
TemplateData
[edit]This is the TemplateData for this template used by TemplateWizard, VisualEditor and other tools.
TemplateData for Tlx
Template list expanded
Parameter | Description | Type | Status | |
---|---|---|---|---|
Template | 1 | Linked template name | Page name | optional |
Parameter | 2 | Optional parameter | String | optional |
3 | 3 | For 2 parameters | String | optional |
4 | 4 | For 3 parameters | String | optional |
5 | 5 | For 4 parameters | String | optional |
6 | 6 | For 5 parameters | String | optional |
7 | 7 | For 6 parameters | String | optional |
Overflow | 8 | Overflow shown as ... | String | optional |
Interwiki | SISTER | Optional InterWiki link prefix | String | optional |
See also
[edit]Template linking templates
Text style ↓ | {{tlg}} options[note 1]to achieve text style |
Link Style | ||
---|---|---|---|---|
Linked | Unlinked | Linked with subst: | ||
{{tlg}} options[note 1]to achieve link style |
N/A | DEFAULT | nolink=yes
|
subst=yes
|
Normal | DEFAULT |
|
|
|
code
|
code=yes
|
|
N/A | |
monospace | plaincode=yes |
N/A | ||
kbd | kbd=yes | |||
bold | bold=yes
|
|
N/A |
- ↑ a b c
{{tlg}}
is the most general template, allowing any combination of text style and/or link style options. - ↑ Allows links to templates in any namespace.
- ↑ a b Prevents wrapping of text by placing it inside
<span class="nowrap">...</span>
tags. - ↑
{{tlg|plaincode=yes}}
uses<code style="border:none; background-color:transparent;">...</code>
. - ↑ a b c Displays monospaced font using
<span style="font-family:monospace;">...</span>
.