Template:Template link expanded
{{Template:Template link expanded}}
| This template uses Lua: |
| This template is used in system messages. Changes to it can cause immediate changes to the Wikipedia user interface. To avoid major disruption, 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. Please discuss changes on the talk page before implementing them. |
Dis template, wey people often shorten as {{tlx}}, dey help give template displays special formatting without actually running the template itself. The code wey e generate go show inside the line.
Parameters
[edit source]Except for alttext, the named parameters be switches wey you either leave out (which be the normal setting for most cases) or turn on (by giving value like "on", "yes", "true", "include", and so on).
You fit put dem in any order (check the Examples below).
Some templates get certain parameters turned on by default. Check the main table for all the different options.
If one row show exactly the same thing as the row before am, e mean the current template no support that option and you need use {{tlg}} instead.
| Parameter | Action | Use with {{example}} | Default active |
|---|---|---|---|
| Default (without accessory parameters) | {{example}} | ||
| brace | Add braces as part of the template link | {{example}} | {{tlw}}/{{tn}} |
| braceinside | Add the inner braces as part of the template link | {{example}} | |
| bold | Make the template link/name show in bold | {{example}} | {{tlb}}, {{tlxb}} |
| code | Show output using HTML <code>...</code> tags (fixed-width font) | {{example}} | {{tlc}}, {{Template link expanded}}, etc. |
| italic | Show parameters that come with the template link/name in italics | {{example|param}} | {{tlxi}} |
| kbd | Show output using HTML <kbd>...</kbd> tags (fixed-width font) | {{example}} | |
| nolink | Stop the template name from becoming a link | {{example}} | {{tlf}}, {{tnull}} |
| nowrap | Stop line breaks (word wrap) from entering the output | {{example}} | {{tlf}}, {{tlp}} |
| nowrapname | Stop word wrapping in the template name/link output (parameters fit still wrap if needed) | {{example}} | |
| plaincode | Use <code style="border:none; background:transparent;">...</code> | {{example}} | {{tltss}} |
| subst | Add a subst: prefix before the template link/name | {{subst:example}} | {{tls}}, {{tlxs}}, etc |
alttext=[text] | Replace [text] with the actual label wey go display for the template link | {{Other}} | {{tla}} |
| _show_result | E go also show the result of the template | Lua error: expandTemplate: template "Template:Min" does not exist. | |
| _expand | E go add link to the expanded template page | {{Min|7|-5}} | |
| a | E go put asterisk before the template code | * {{Min|7|-5}} |
Unnamed (Positional)
[edit source]Dis template fit take any number of unnamed parameters as parameters wey follow the template link (or name); see Examples below.
Examples
[edit source]Use the displayed value inside the code column, no be the hidden source code.
| Code | Output |
|---|---|
{{tlx|long template name that would wrap to new line|this is a long value for the 1st parameter that would wrap}} |
{{long template name that would wrap to new line|this is a long value for the 1st parameter that would wrap}} |
| Code | Output |
|---|---|
{{tlx|nowrap=on|long template name that would wrap to new line|long value for the 1st parameter that would wrap}} |
{{long template name that would wrap to new line|long value for the 1st parameter that would wrap}} |
| Code | Output |
|---|---|
{{tlx|nowrapname=on|long template name that would wrap to new line|long value for the 1st parameter that would wrap}} |
{{long template name that would wrap to new line|long value for the 1st parameter that would wrap}} |
TemplateData
[edit source]TemplateData for Template link expanded
This template, often abbreviated as {{tlg}}, is used to provide stylized formatting to template displays without actually using the template itself. The code generated will be displayed inline.
| Parameter | Description | Type | Status | |
|---|---|---|---|---|
| Template name | 1 | no description | String | required |
| First parameter | 2 | First parameter of the template | Content | suggested |
| Second parameter | 3 | Second parameter of the template | Content | suggested |
| Third parameter | 4 | Third parameter of the template | Content | optional |
| Fourth parameter | 5 | Fourth parameter of the template | Content | optional |
| Fifth parameter | 6 | Fifth parameter of the template | Content | optional |
| Sixth parameter | 7 | Sixth parameter of the template | Content | optional |
| Seventh parameter | 8 | Seventh parameter of the template | Content | optional |
| Eigth parameter | 9 | Eigth parameter of the template | Content | optional |
| Ninth parameter | 10 | Ninth parameter of the template | Content | optional |
| brace | brace | Include braces as part of the template link | Boolean | optional |
| braceinside | braceinside | Include innermost braces as part of the template link | Boolean | optional |
| bold | bold | Renders the template link/name in bold | Boolean | optional |
| code | code | Display output using HTML <code>…</code> tags (monospaced font) | Boolean | optional |
| italic | italic | Display any parameters accompanying the template link/name in italics | Boolean | optional |
| kbd | kbd | Display output using HTML <kbd>...</kbd> tags (monospaced font) | Boolean | optional |
| nolink | nolink | Don't render the template name as a link | Boolean | optional |
| nowrap | nowrap | Prevent the insertion of line breaks (word wrap) in the output | Boolean | optional |
| nowrapname | nowrapname | Prevent word wrapping in the output of template name/link (parameters will wrap if needed) | Boolean | optional |
| plaincode | plaincode | Uses <code style="border:none; background:transparent;">...</code> | Boolean | optional |
| subst | subst | Include a subst: prefix before the template link/name | Boolean | optional |
| alttext | alttext | Label to be displayed for the template link | String | optional |
| _show_result | _show_result | Display the result of the template | Boolean | optional |
| _expand | _expand | Add a link to the expanded template page | Boolean | optional |
| a | a | Add an asterisk before the template code | Boolean | optional |
See also
[edit source]Template:Template-linking templates Template:Semantic markup templates