Template:Tlx/doc
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 uses TemplateStyles: |
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
[edit]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|x1|2=x=u}} | {{x1|x=u}} | numbered parameter 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 |
TemplateData
[edit]This is the TemplateData documentation for this template used by VisualEditor and other tools.
Tlx
Template list expanded
Parameter | Description | Type | Status | |
---|---|---|---|---|
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 |
Overflow | 8 | Overflow shown as ... | String | optional |
Nowrap? | nowrap | Whether to add “<span style="white-space: nowrap">”
| Boolean | optional |
Interwiki | SISTER | Optional InterWiki link prefix | String | optional |
See also
[edit]
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=1
|
subst=1
|
normal | DEFAULT |
|
| |
code
|
code=1
|
|
|
|
monospace | mono=1 |
N/A | ||
plaincode
|
plaincode=1 | |||
kbd | kbd=1 |
- ↑ 1.0 1.1 1.2
{{tlg}}
is the most general template, allowing any combination of text style and/or link style options. - ↑ 2.0 2.1 2.2 Prevents wrapping of text by placing it inside
<span style="white-space:nowrap">...</span>
tags. - ↑ Allows links to templates in any namespace.
- ↑ 4.0 4.1 4.2 Displays monospaced font using
<span style="font-family:monospace">...</span>
. - ↑
{{tlg|plaincode=1}}
uses<code style="background:transparent;border:none">...</code>
. - ↑
{{tlg|kbd=1}}
uses<kbd>
tags.