Hopp til innhald

Mal:Template link code

Frå Wikipedia – det frie oppslagsverket

{{tlc|...}}

[sjå] [endra] [oppdater] Maldokumentasjon


This template, often abbreviated as {{tlc}}, is used to provide stylized formatting to template displays without actually using the template itself. The code generated will be displayed inline. For a multi-line output, see {{tj}}.

Parameters

[endre wikiteksten]

With the exception of alttext, the named parameters are toggles that are either omitted (default in most cases) or activated (by being assigned a value such as "on", "yes", "true", "include", etc.). They may be included in any order (see Examples below). Certain templates have the parameter "on" by default; see the main table for all alternate options. If a row renders identically to a previous row, it means the current template does not support that option and Mal:T needs to be used instead.

Parameter Action Use with
{{example}}
Default active
Default (without accessory parameters) Mal:Tlg
brace Include braces as part of the template link Mal:Tlg {{tlw}}/{{tn}}
braceinside Include innermost braces as part of the template link Mal:Tlg
bold Renders the template link/name in bold Mal:Tlg {{tlb}}, {{tlxb}}
code Display output using HTML [[HTML element#code|Mal:Tag]] tags (monospaced font) Mal:Tlg {{tlc}}, {{Template link expanded}}, etc.
italic Display any parameters accompanying the template link/name in italics Mal:Tlg {{tlxi}}
kbd Display output using HTML [[HTML element#kbd|Mal:Tag]] tags (monospaced font) Mal:Tlg
nolink Don't render the template name as a link Mal:Tlg {{tlf}}, {{tnull}}
nowrap Prevent the insertion of line breaks (word wrap) in the output Mal:Tlg {{tlp}}
nowrapname Prevent word wrapping in the output of template name/link (parameters will wrap if needed) Mal:Tlg
plaincode Uses Mal:Tag Mal:Tlg {{tltss}}
subst Include a subst: prefix before the template link/name Mal:Tlg {{tls}}, {{tlxs}}, etc
alttext=[text] Replace [text] with the actual label to be displayed for the template link Mal:Tlg {{tla}}
_show_result Will also display the result of the template Mal:Tlg
_expand Will add a link to the expanded template page Mal:Tlg
a will add an asterisk before the template code Mal:Tlg

Unnamed (Positional)

[endre wikiteksten]

This template can take any number of unnamed parameters as parameters accompanying the template link (or name); see Examples below.

Use the displayed value in the code column, not the underlying source code.

Code Output Remarks
Mal:Tji Mal:Tlg Template:Banner does not exist. (Non-existent template is redlinked.)
Mal:Tji Mal:Tlg Template:Abc exists.
Mal:Tji Mal:Tlg Template names are case-sensitive
Mal:Tji Mal:Tlg (but the first letter is case-insensitive).
Mal:Tji Mal:Tlg no parameters
Mal:Tji Mal:Tlg one parameter
Mal:Tji Mal:Tlg two parameters
Mal:Tji Mal:Tlg two parameters, assigned values
Mal:Tji Mal:Tlg ten parameters
Mal:Tji Mal:Tlg Unlimited parameters, as one Mal:Tag string.
Mal:Tji Mal:Tlg Empty parameters are discarded.
Mal:Tji Mal:Tlg <code> style
Mal:Tji Mal:Tlg plaincode style
Mal:Tji Mal:Tlg <kbd> style
Mal:Tji Mal:Tlg bold link/name
Mal:Tji Mal:Tlg parameter(s) in italics
Mal:Tji Mal:Tlg
Mal:Tji Mal:Tlg
Mal:Tji Mal:Tlg all braces in link
Mal:Tji Mal:Tlg inside braces in link
Mal:Tji Mal:Tlg
Mal:Tji Mal:Tlg Combine multiple parameter settings.
Mal:Tji Mal:Tlg Using {{spaces}} before and after a parameter.
Mal:Tji Mal:Tlg Can combine named and anonymous parameters ...
Mal:Tji Mal:Tlg ... in any order ...
Mal:Tji Mal:Tlg ... even intermixed ...
Mal:Tji Mal:Tlg ... with many configurations.
Mal:Tji Mal:Tlg = won't work
Mal:Tji Mal:Tlg &#61; is okay
Mal:Tji Mal:Tlg {{=}} is okay (see Template:=)
Mal:Tji Mal:Tlg Sticky nowiki is okay.
Mal:Tji Mal:Tlg
Right-to-left is okay
Mal:Tji tlg With no arguments, it emits the current page name without braces.
Mal:Tji Mal:Tlg Null parameter stops parsing.
Wrapping of long names (default)
Code Output
Mal:Tji Mal:Tlg
Wrapping of long names (nowrap=on)
Code Output
Mal:Tji Mal:Tlg
Wrapping of long names (nowrapname=on)
Code Output
Mal:Tji Mal:Tlg

Mal:Sandbox other