Vorlage:Tlg/doc
This is [[MediaWiki:Tagline]]. Set to <code>display:none</code> by chameleon skin.
This is a documentation subpage for Vorlage:Tlg. It contains usage information, categories and other content that is not part of the original vorlage page. |
Explanation
{{tlg}}
(template link, general) is a general template for inserting a template link. It can be used to replace or implement any of the more specific {{tl*}}
templates, e.g. {{tl}}
or {{tlx}}
. Parameters are:
: Use thecode=yes
<code>…</code>
HTML attribute (usually a monospaced font), like for{{tlc}}
and{{tlx}}
: Boldface the textbold=yes
: Italicizes the parametersitalic=yes
: Don't insert a template link, like fornolink=yes
{{tlf}}
,{{tld}}
, and{{tlc}}
: Put braces inside the linkbraceinside=yes
: Add asubst=yes
prefixsubst:
: Specify alternative surface text for a link, like foralttext=FOO
{{tla}}
: Prevent line breaks in outputnowrap=yes
Examples
- 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|Abc}} | {{Abc}} | |
{{tlg|abC}} | {{abC}} | template names are case-sensitive |
{{tlg|abc}} | {{abc}} | first letter is case-insensitive though |
{{tlg|x0}} | {{x0}} | |
{{tlg|x0|code=yes}} | {{x0}} | code style |
{{tlg|x0|bold=yes}} | {{x0}} | bold style |
{{tlg|x1|one|italic=yes}} | {{x1|one}} | italic style |
{{tlg|x0|nolink=yes}} | {{x0}} | |
{{tlg|x0|subst=yes}} | {{subst:x0}} | |
{{tlg|x0|braceinside=yes}} | {{x0}} | |
{{tlg|x0|alttext=Link to x0 template}} | {{Link to x0 template}} | |
{{tlg|x0|bold=yes|code=yes|braceinside=yes}} | {{x0}} | No reason you can't combine multiple parameter settings |
{{tlg|x1|one}} | {{x1|one}} | |
{{tlg|x2|one|two}} | {{x2|one|two}} | |
{{tlg|x2|bold=yes|code=yes|one|two}} | {{x2|one|two}} | Can combine named and anonymous parameters … |
{{tlg|x2|one|two|bold=yes|code=yes}} | {{x2|one|two}} | … in any order … |
{{tlg|x2|one|code=yes|two|bold=yes|three}} | {{x2|one|two|three}} | … even intermixed … |
{{tlg|x2|one|code=yes|two|bold=yes|three|italic=yes}} | {{x2|one|two|three}} | … with many different configurations. |
{{tlg|x3|1|2|3|4|5|6|7|8|9|10}} | {{x3|1|2|3|4|5|6|7|8|9|10}} | |
{{tlg|x4|1|2|3|4|5|6|7|8|9|10|11}} | {{x4|1|2|3|4|5|6|7|8|9|10|…}} | up to 10 parameters, then … |
{{tlg|x5|1|2|3|4|5|6|7|8|9|10|11}} | {{x5|1|2|3|4|5|6|7|8|9|10|11}} | | for more |
{{tlg}} | {{Tlg/doc}} | with no arguments, the current page name is substituted |
{{tlg|x1|x=u}} | {{x1|x=u}} | = won't work |
{{tlg|x1|x=u}} | {{x1|x=u}} | = is okay |
{{tlg|x1|x{{=}}u}} | {{x1|x=u}} | {{=}} is okay |
{{tlg|x1|x<nowiki>=</nowiki>u}} | {{x1|x=u}} | sticky nowiki is okay
|
{{tlg|x2||two||}} | {{x2||two||}} | empty parameters work too, even at the end |
{{tlg|x2|2=one|two}} | {{x2|2=one|two}} | two clobbers 2=one |
{{tlg|x2|3=two|2=one}} | {{x2|3=two|2=one}} | right to left okay
|
- Unlimited parameters as one nowiki string
{{tlg|convert|<nowiki>14|m|ftin|abbr=out|sp=us</nowiki>}}
See also
Link style → | Linked | Unlinked | Linked with alternative text | |
---|---|---|---|---|
Text style ↓ | ↓ {{tlg}} options1 →
|
N/A |
|
|
Normal | N/A | {{tlg}} 1, 2{{tl}} {{tlp}} 2
|
{{tlf}} 2
|
{{tla}}
|
Code
|
or
|
{{tlx}}
|
{{tlc}} 2{{tld}} 2{{tnull}}
|
N/A |
- 1
{{tlg}}
is the most general, allowing any combination of text style and/or link style options. - 2 Prevents wrapping of text by placing it inside
<span class="nowrap">...</span>
tags. - 3 Uses monospace font but not
<code>...</code>
.