Jump to content

Template:Template link general/doc


Dis template, wey people often shorten as {{tlg}}, 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.

ParameterActionUse with
{{example}}
Default active
Default (without accessory parameters){{example}}
braceAdd braces as part of the template link{{example}}{{tlw}}/{{tn}}
braceinsideAdd the inner braces as part of the template link{{example}}
boldMake the template link/name show in bold{{example}}{{tlb}}, {{tlxb}}
codeShow output using HTML <code>...</code> tags (fixed-width font){{example}}{{tlc}}, {{Template link expanded}}, etc.
italicShow parameters that come with the template link/name in italics{{example|param}}{{tlxi}}
kbdShow output using HTML <kbd>...</kbd> tags (fixed-width font){{example}}
nolinkStop the template name from becoming a link{{example}}{{tlf}}, {{tnull}}
nowrapStop line breaks (word wrap) from entering the output{{example}}{{tlf}}, {{tlp}}
nowrapnameStop word wrapping in the template name/link output (parameters fit still wrap if needed){{example}}
plaincodeUse <code style="border:none; background:transparent;">...</code>{{example}}{{tltss}}
substAdd 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_resultE go also show the result of the templateLua error: expandTemplate: template "Template:Min" does not exist.
_expandE go add link to the expanded template page{{Min|7|-5}}
aE 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.

Template:Aligned table

Wrapping of long names (default)
Code Output
{{tlg|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}}
Wrapping of long names (nowrap=on)
Code Output
{{tlg|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}}
Wrapping of long names (nowrapname=on)
Code Output
{{tlg|nowrapname=on|long template name that would wrap to new line|long value for the 1st parameter that would wrap}}

TemplateData

[edit source]
This is the TemplateData for this template used by TemplateWizard, VisualEditor and other tools. See a monthly parameter usage report for Template:Template link general in articles based on its TemplateData.

TemplateData for Template link general

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.

Template parameters

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
Template name1

no description

Stringrequired
First parameter2

First parameter of the template

Contentsuggested
Second parameter3

Second parameter of the template

Contentsuggested
Third parameter4

Third parameter of the template

Contentoptional
Fourth parameter5

Fourth parameter of the template

Contentoptional
Fifth parameter6

Fifth parameter of the template

Contentoptional
Sixth parameter7

Sixth parameter of the template

Contentoptional
Seventh parameter8

Seventh parameter of the template

Contentoptional
Eigth parameter9

Eigth parameter of the template

Contentoptional
Ninth parameter10

Ninth parameter of the template

Contentoptional
bracebrace

Include braces as part of the template link

Booleanoptional
braceinsidebraceinside

Include innermost braces as part of the template link

Booleanoptional
boldbold

Renders the template link/name in bold

Booleanoptional
codecode

Display output using HTML <code>…</code> tags (monospaced font)

Booleanoptional
italicitalic

Display any parameters accompanying the template link/name in italics

Booleanoptional
kbdkbd

Display output using HTML <kbd>...</kbd> tags (monospaced font)

Booleanoptional
nolinknolink

Don't render the template name as a link

Booleanoptional
nowrapnowrap

Prevent the insertion of line breaks (word wrap) in the output

Booleanoptional
nowrapnamenowrapname

Prevent word wrapping in the output of template name/link (parameters will wrap if needed)

Booleanoptional
plaincodeplaincode

Uses <code style="border:none; background:transparent;">...</code>

Booleanoptional
substsubst

Include a subst: prefix before the template link/name

Booleanoptional
alttextalttext

Label to be displayed for the template link

Stringoptional
_show_result_show_result

Display the result of the template

Booleanoptional
_expand_expand

Add a link to the expanded template page

Booleanoptional
aa

Add an asterisk before the template code

Booleanoptional

See also

[edit source]

Template:Template-linking templates Template:Semantic markup templates