Jump to content

ᥗᥦᥛᥰ ᥙᥣ ᥘᥥᥐᥳ:Tlg/doc

ᥘᥧᥐ ᥖᥤ ᥝᥤᥱ ᥑᥤᥱ ᥚᥤᥱ ᥖᥤᥱ ᥕᥣᥱ ᥛᥣᥰ

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}}.

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 {{tlg}} needs to be used instead.

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

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.

Note
On the source sister projects, en.wikipedia and Meta, X0, X1, X2, ..., X9 are sandbox templates for experimentation on involved templates that need be in template space. An auto-cleansing software facility exists that might be used to duplicate the facility on other Sister projects.
Code Output Remarks
{{tlg|Banner}} ᥗᥦᥛᥰ ᥙᥣ ᥘᥥᥐᥳ:Tlg Template:Banner does not exist. (Non-existent template is redlinked.)
{{tlg|Abc}} ᥗᥦᥛᥰ ᥙᥣ ᥘᥥᥐᥳ:Tlg Template:Abc exists.
{{tlg|abC}} ᥗᥦᥛᥰ ᥙᥣ ᥘᥥᥐᥳ:Tlg Template names are case-sensitive
{{tlg|abc}} ᥗᥦᥛᥰ ᥙᥣ ᥘᥥᥐᥳ:Tlg (but the first letter is case-insensitive).
{{tlg|x0}} ᥗᥦᥛᥰ ᥙᥣ ᥘᥥᥐᥳ:Tlg no parameters
{{tlg|x1|one}} ᥗᥦᥛᥰ ᥙᥣ ᥘᥥᥐᥳ:Tlg one parameter
{{tlg|x2|one|two}} ᥗᥦᥛᥰ ᥙᥣ ᥘᥥᥐᥳ:Tlg two parameters
{{tlg|x2|2=one=1|3=two=2}} ᥗᥦᥛᥰ ᥙᥣ ᥘᥥᥐᥳ:Tlg two parameters, assigned values
{{tlg|x3|1|2|3|4|5|6|7|8|9|10}} ᥗᥦᥛᥰ ᥙᥣ ᥘᥥᥐᥳ:Tlg ten parameters
{{tlg|convert|14|m|ftin|abbr=out|sp=us}} ᥗᥦᥛᥰ ᥙᥣ ᥘᥥᥐᥳ:Tlg Unlimited parameters, as one <nowiki>...</nowiki> string.
{{tlg|x2||two||}} ᥗᥦᥛᥰ ᥙᥣ ᥘᥥᥐᥳ:Tlg Empty parameters are discarded.
{{tlg|x0|code=on}} ᥗᥦᥛᥰ ᥙᥣ ᥘᥥᥐᥳ:Tlg <code> style
{{tlg|x0|plaincode=on}} ᥗᥦᥛᥰ ᥙᥣ ᥘᥥᥐᥳ:Tlg plaincode style
{{tlg|x0|kbd=on}} ᥗᥦᥛᥰ ᥙᥣ ᥘᥥᥐᥳ:Tlg <kbd> style
{{tlg|x0|bold=on}} ᥗᥦᥛᥰ ᥙᥣ ᥘᥥᥐᥳ:Tlg bold link/name
{{tlg|x1|one|italic=on}} ᥗᥦᥛᥰ ᥙᥣ ᥘᥥᥐᥳ:Tlg parameter(s) in italics
{{tlg|x0|nolink=on}} ᥗᥦᥛᥰ ᥙᥣ ᥘᥥᥐᥳ:Tlg
{{tlg|x0|subst=on}} ᥗᥦᥛᥰ ᥙᥣ ᥘᥥᥐᥳ:Tlg
{{tlg|x0|brace=on}} ᥗᥦᥛᥰ ᥙᥣ ᥘᥥᥐᥳ:Tlg all braces in link
{{tlg|x0|braceinside=on}} ᥗᥦᥛᥰ ᥙᥣ ᥘᥥᥐᥳ:Tlg inside braces in link
{{tlg|x0|alttext=x0 link}} ᥗᥦᥛᥰ ᥙᥣ ᥘᥥᥐᥳ:Tlg
{{tlg|x0|bold=on|code=on|brace=on}} ᥗᥦᥛᥰ ᥙᥣ ᥘᥥᥐᥳ:Tlg Combine multiple parameter settings.
{{tlg|abc|{{spaces}}one{{spaces}}}} ᥗᥦᥛᥰ ᥙᥣ ᥘᥥᥐᥳ:Tlg Using {{spaces}} before and after a parameter.
{{tlg|x2|bold=on|code=on|one|two}} ᥗᥦᥛᥰ ᥙᥣ ᥘᥥᥐᥳ:Tlg Can combine named and anonymous parameters ...
{{tlg|x2|one|two|bold=on|code=on}} ᥗᥦᥛᥰ ᥙᥣ ᥘᥥᥐᥳ:Tlg ... in any order ...
{{tlg|x2|one|code=on|two|bold=on|three}} ᥗᥦᥛᥰ ᥙᥣ ᥘᥥᥐᥳ:Tlg ... even intermixed ...
{{tlg|x2|one|code=on|two|bold=on|three|italic=on}} ᥗᥦᥛᥰ ᥙᥣ ᥘᥥᥐᥳ:Tlg ... with many configurations.
{{tlg|x1}} ᥗᥦᥛᥰ ᥙᥣ ᥘᥥᥐᥳ:Tlg = won't work
{{tlg|x1|x=u}} ᥗᥦᥛᥰ ᥙᥣ ᥘᥥᥐᥳ:Tlg &#61; is okay
{{tlg|x1|x=u}} ᥗᥦᥛᥰ ᥙᥣ ᥘᥥᥐᥳ:Tlg {{=}} is okay (see Template:=)
{{tlg|x1|x=u}} ᥗᥦᥛᥰ ᥙᥣ ᥘᥥᥐᥳ:Tlg Sticky nowiki is okay.
{{tlg|x2|3=two|2=one}} ᥗᥦᥛᥰ ᥙᥣ ᥘᥥᥐᥳ:Tlg
Right-to-left is okay
{{tlg}} tlg With no arguments, it emits the current page name without braces.
{{tlg|x2|3=one|4=two}} ᥗᥦᥛᥰ ᥙᥣ ᥘᥥᥐᥳ:Tlg Null parameter stops parsing.
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}} ᥗᥦᥛᥰ ᥙᥣ ᥘᥥᥐᥳ:Tlg
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}} ᥗᥦᥛᥰ ᥙᥣ ᥘᥥᥐᥳ:Tlg
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}} ᥗᥦᥛᥰ ᥙᥣ ᥘᥥᥐᥳ:Tlg

ᥗᥦᥛᥰ ᥙᥣ ᥘᥥᥐᥳ:Template-linking templates