Aller au contenu

Talɣa:Template link general/antam

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. For a multi-line output, see {{tj}}.

Parameters

[Snfl asagm]

With the exception of Talɣa:Mono, 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 Talɣa:T needs to be used instead.

ParameterActionUse with
{{example}}
Default active
Default (without accessory parameters){{example}}
braceInclude braces as part of the template link{{example}}{{tlw}}/{{tn}}
braceinsideInclude innermost braces as part of the template link{{example}}
boldRenders the template link/name in bold{{example}}{{tlb}}, {{tlxb}}
codeDisplay output using HTML <code>...</code> tags (monospaced font){{example}}{{tlc}}, {{Template link expanded}}, etc.
italicDisplay any parameters accompanying the template link/name in italics{{example|param}}{{tlxi}}
kbdDisplay output using HTML <kbd>...</kbd> tags (monospaced font){{example}}
nolinkDon't render the template name as a link{{example}}{{tlf}}, {{tnull}}
nowrapPrevent the insertion of line breaks (word wrap) in the output{{example}}{{tlp}}
nowrapnamePrevent word wrapping in the output of template name/link (parameters will wrap if needed){{example}}
plaincodeUses <code style="border:none; background:transparent;">...</code>{{example}}{{tltss}}
substInclude a subst: prefix before the template link/name{{subst:example}}{{tls}}, {{tlxs}}, etc
alttext=[text]Replace [text] with the actual label to be displayed for the template link{{Other}}{{tla}}
_show_resultWill also display the result of the template{{Min|7|-5}} → -5
_expandWill add a link to the expanded template page{{Min|7|-5}}
awill add an asterisk before the template code* {{Min|7|-5}}

Unnamed (Positional)

[Snfl asagm]

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

Examples

[Snfl asagm]

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

Code Output Remarks
Talɣa:Tji {{Banner}} Template:Banner does not exist. (Non-existent template is redlinked.)
Talɣa:Tji {{Abc}} Template:Abc exists.
Talɣa:Tji {{abC}} Template names are case-sensitive
Talɣa:Tji {{abc}} (but the first letter is case-insensitive).
Talɣa:Tji {{x0}} no parameters
Talɣa:Tji {{x1|one}} one parameter
Talɣa:Tji {{x2|one|two}} two parameters
Talɣa:Tji {{x2|one=1|two=2}} two parameters, assigned values
Talɣa:Tji {{x3|1|2|3|4|5|6|7|8|9|10}} ten parameters
Talɣa:Tji {{convert|14|m|ftin|abbr=out|sp=us}} Unlimited parameters, as one <nowiki>...</nowiki> string.
Talɣa:Tji {{x2|two}} Empty parameters are discarded.
Talɣa:Tji {{x0}} <code> style
Talɣa:Tji {{x0}} plaincode style
Talɣa:Tji {{x0}} <kbd> style
Talɣa:Tji {{x0}} bold link/name
Talɣa:Tji {{x1|one}} parameter(s) in italics
Talɣa:Tji {{x0}}
Talɣa:Tji {{subst:x0}}
Talɣa:Tji {{x0}} all braces in link
Talɣa:Tji {{x0}} inside braces in link
Talɣa:Tji {{x0 link}}
Talɣa:Tji {{x0}} Combine multiple parameter settings.
Talɣa:Tji {{abc| one }} Using {{spaces}} before and after a parameter.
Talɣa:Tji {{x2|one|two}} Can combine named and anonymous parameters ...
Talɣa:Tji {{x2|one|two}} ... in any order ...
Talɣa:Tji {{x2|one|two|three}} ... even intermixed ...
Talɣa:Tji {{x2|one|two|three}} ... with many configurations.
Talɣa:Tji {{x1}} = won't work
Talɣa:Tji {{x1|x=u}} &#61; is okay
Talɣa:Tji {{x1|x=u}} {{=}} is okay (see Template:=)
Talɣa:Tji {{x1|x=u}} Sticky nowiki is okay.
Talɣa:Tji {{x2|one|two}}
Right-to-left is okay
Talɣa:Tji tlg With no arguments, it emits the current page name without braces.
Talɣa:Tji {{x2}} Null parameter stops parsing.
Wrapping of long names (default)
Code Output
Talɣa:Tji {{long template name that would wrap to new line|this is a long value for the 1st parameter that would wrap}}
Wrapping of long names (nowrap=on)
Code Output
Talɣa:Tji {{long template name that would wrap to new line|long value for the 1st parameter that would wrap}}
Wrapping of long names (nowrapname=on)
Code Output
Talɣa:Tji long value for the 1st parameter that would wrap}}

See also

[Snfl asagm]

Talɣa:Template-linking templates Talɣa:Semantic markup templates