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.

ParameterActionUse with
{{example}}
Default active
Default (without accessory parameters)Mal:Tlg
braceInclude braces as part of the template linkMal:Tlg{{tlw}}/{{tn}}
braceinsideInclude innermost braces as part of the template linkMal:Tlg
boldRenders the template link/name in boldMal:Tlg{{tlb}}, {{tlxb}}
codeDisplay output using HTML [[HTML element#code|Mal:Tag]] tags (monospaced font)Mal:Tlg{{tlc}}, {{Template link expanded}}, etc.
italicDisplay any parameters accompanying the template link/name in italicsMal:Tlg{{tlxi}}
kbdDisplay output using HTML [[HTML element#kbd|Mal:Tag]] tags (monospaced font)Mal:Tlg
nolinkDon't render the template name as a linkMal:Tlg{{tlf}}, {{tnull}}
nowrapPrevent the insertion of line breaks (word wrap) in the outputMal:Tlg{{tlp}}
nowrapnamePrevent word wrapping in the output of template name/link (parameters will wrap if needed)Mal:Tlg
plaincodeUses Mal:TagMal:Tlg{{tltss}}
substInclude a subst: prefix before the template link/nameMal:Tlg{{tls}}, {{tlxs}}, etc
alttext=[text]Replace [text] with the actual label to be displayed for the template linkMal:Tlg{{tla}}
_show_resultWill also display the result of the templateMal:Tlg
_expandWill add a link to the expanded template pageMal:Tlg
awill add an asterisk before the template codeMal: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