Template:Tlx: Difference between revisions
mNo edit summary |
mNo edit summary |
||
Line 2: | Line 2: | ||
-->|<span class="monospaced nowrap">{{<!-- | -->|<span class="monospaced nowrap">{{<!-- | ||
--><noinclude>[[Template:Tlx|tlx]]</noinclude><!-- | --><noinclude>[[Template:Tlx|tlx]]</noinclude><!-- | ||
--><includeonly>[[{{{ | --><includeonly>[[{{{9}}}:{{{1}}}|{{{1}}}]]</includeonly><!-- | ||
-->{{#if:{{{2|}}}||{{{2}}}}}<!-- | -->{{#if:{{{2|}}}||{{{2}}}}}<!-- | ||
-->{{#if:{{{3|}}}||{{{3}}}}}<!-- | -->{{#if:{{{3|}}}||{{{3}}}}}<!-- |
Revision as of 18:21, 3 November 2021
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 |
---|---|---|
up to 7 parameters, then ... | ||
| for more
| ||
= won't work | ||
= is okay
| ||
sticky nowiki is okay | ||
numbered parameter is okay | ||
empty won't work | ||
  is okay
| ||
is okay
| ||
| is okay
| ||
{{!}} is dubious
| ||
empty really doesn't work | ||
right to left okay |
TemplateData
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
Text style ↓ | options[note 1] to achieve text style |
Link style | ||
---|---|---|---|---|
Linked | Unlinked | Linked with subst | ||
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.
[[Category:Internal template-link templates{{#translation:}}]] [[Category:Semantic markup templates{{#translation:}}]]