Template:T/main
< Template:T
T/main
This template has been protected from editing to prevent vandalism.
Please discuss changes on the talk page or request unprotection.
Template documentation​view · edit · history ·purge ]
This documentation is transcluded from Template:T/doc.
Note: This template is used on a lot of pages. In order not to put too much load on the servers, edits should be kept to a bare minimum. Please discuss proposed changes on the talk page first.
Afterwards, changes can initially be done at and tested with Template:T/sandbox.
  • Editing a template causes all pages that use the template to be re-rendered. If the template is used often, this can put a lot of load on the servers since it fills up the job queue.
  • Keep in mind that templates that are used on file description pages also show up on other wikis.
  • This page has been protected from editing to prevent vandalism. Only administrators can edit it. Get their attention by placing {{Edit protected}} at the talk page.
The template:T/main is the main template of
T links to a Template. T creates a formatted link to a template and surrounds it with {{...}} making the brackets a part of the link.
Usage
{{T |1= }}
Template parameters
ParameterDescriptionDefaultStatus
1template name (any namespace is ignored)Toptional
2display name (displayed as-it-is)parameter 1optional
3
lang
interwiki language code (ISO 639), if the template is in another Wikipedia
can also be specified with lang=
emptyoptional
4+/- to precede the template name with the namespace Template:
  • + (plus sign) to make Template: a part of the link,
  • - (minus sign) to precede Template: as plain text.
The +/- parameter can as well be specified with parameter 2 or 3;
(when both signs are specified, "+" has precedence).
emptyoptional
incl
i
i or incl is a numeric value,
  • 0: none of the brackets are part of the link
  • 1: the inner brackets are part of the link
  • 2: both brackets are part of the link
  • 3: like i=2, with monospace font
  • 4: like i=0 but with the name in teletype style
  • 5: like i=1 but with the name in teletype style
  • 6: like i=2 but with the name in teletype style
  • 8: without surrounding brackets
  • 9: like i=8 but with the name in teletype style
2optional
codeany value, for a surrounding <code> tag  (like {{Tl2}}).
With code=tt also the surrounding brackets are in teletype style.
emptyoptional
linkreturns plain text instead of a link when set to link=noemptyoptional
casefor formatting of the namespace prefix:
  • case=l lowercase display "template" instead of "Template"
  • case=i internationalized display, in general a link
  • case=n internationalized display, without linking it
emptyoptional
i18nanother language than {{int:lang}} for namespace translation (when case=i or case=n)enoptional
parmto display templates parameters  (like {{Tlx}})
Usage e.g. parm=template name or parm=1=template name
or  parm=&#124;1=&#124;2=&#124;code=y​" gives "|1=|2=|code=y".
For a better appearing and easier to format explanatory, use the meta template {{Tle}}.
emptyoptional
fullexpanded display: Template:{{Example}}  (like {{Lts}})
request this expansion with either full=5 or 5=full.
emptyoptional
Additional information
The template is intended to be used in the following namespaces: all namespaces
The template is intended to be used by the following user groups: all users
Localization
This template is not intended to be localized.
The template does not generate any localizable text;
with + or - always the namespace in English: "Template" is displayed;
only in combination with case=i or case=n the namespace can be translated using the {{LangSwitch}} construct (according to i18n).
[edit subpage]
Note: The templates T, T0, T1, T2, Tl use the same main template with the only difference of the default value for the parameter incl=.
Templateiappearance
T2{{T}}
T08T0
T11{{T1}}
T20{{T2}}
Tl3{{Tl}}
This means that each of them can be converted into each one of the others by just replacing that parameter:
T{{T|1={{{1|}}}|2={{{2|}}}|3={{{3|{{{lang|}}}}}}|i={{{i|{{{incl|​2​}}}}}}|code={{{code|}}}}}{{T/main}}
T0{{T|1={{{1|}}}|2={{{2|}}}|3={{{3|{{{lang|}}}}}}|i={{{i|{{{incl|​8​}}}}}}|code={{{code|}}}}}T/main
T1{{T|1={{{1|}}}|2={{{2|}}}|3={{{3|{{{lang|}}}}}}|i={{{i|{{{incl|​1​}}}}}}|code={{{code|}}}}}{{T/main}}
T2{{T|1={{{1|}}}|2={{{2|}}}|3={{{3|{{{lang|}}}}}}|i={{{i|{{{incl|​0​}}}}}}|code={{{code|}}}}}{{T/main}}
Tl{{T|1={{{1|}}}|2={{{2|}}}|3={{{3|{{{lang|}}}}}}|i={{{i|{{{incl|​3​}}}}}}|code={{{code|}}}}}}}{{T/main}}

Examples
{{T|information}} → {{Information}}
with code=y
The following examples are Lua supportet:
The parameter case (with the other parameters supporting it) intends to be rarely used, but when in a textual environment a special appearance is desired, with the namespace prefix in different formats, the following concealed tables shows the possibilities. All combinations are possible but not every one is useful.
Table: different displays for {{T}} with the namespace option
{{ Texample }} this is the standard{{Example}}
{{ T | example- }}Template:{{Example}}
{{ T | example-case = l }}template:{{Example}}
{{ T | example-case = i }}template:{{Example}}
{{ T | example-case = n }}template:{{Example}}
{{ T | Example+ }}Template:{{Example}}
{{ T | example+case = l }}template:{{Example}}
{{ T | example+case = i }}template:{{Example}}
{{ T | example+case = n }}template:{{Example}}
{{ T | Examplelink = n }}{{Example}}
{{ T | Example-link = n }}Template:{{Example}}
{{ T | example-link = ncase = l }}template:{{Example}}
{{ T | example-link = ncase = i }}template:{{Example}}
{{ T | example-link = ncase = n }}template:{{Example}}
{{ T | example+link = n }}Template:{{Example}}
{{ T | example+link = ncase = l }}template:{{Example}}
{{ T | example+link = ncase = i }}template:{{Example}}
{{ T | example+link = ncase = n }}template:{{Example}}
Large table with displays for {{T}} with the namespace option
linknscasei=i=0i=1i=2i=3i=4i=5i=6i=8i=9
T/main{{T/main}}{{T/main}}{{T/main}}{{T/main}}{{T/main}}{{T/main}}{{T/main}}T/mainT/main
+Template:T/mainTemplate:{{T/main}}Template:{{T/main}}Template:{{T/main}}Template:{{T/main}}Template:{{T/main}}Template:{{T/main}}Template:{{T/main}}Template:T/mainTemplate:T/main
+ltemplate:T/maintemplate:{{T/main}}template:{{T/main}}template:{{T/main}}template:{{T/main}}template:{{T/main}}template:{{T/main}}template:{{T/main}}template:T/maintemplate:T/main
+itemplate:T/maintemplate:{{T/main}}template:{{T/main}}template:{{T/main}}template:{{T/main}}template:{{T/main}}template:{{T/main}}template:{{T/main}}template:T/maintemplate:T/main
+ntemplate:T/maintemplate:{{T/main}}template:{{T/main}}template:{{T/main}}template:{{T/main}}template:{{T/main}}template:{{T/main}}template:{{T/main}}template:T/maintemplate:T/main
-Template:T/mainTemplate:{{T/main}}Template:{{T/main}}Template:{{T/main}}Template:{{T/main}}Template:{{T/main}}Template:{{T/main}}Template:{{T/main}}Template:T/mainTemplate:T/main
-ltemplate:T/maintemplate:{{T/main}}template:{{T/main}}template:{{T/main}}template:{{T/main}}template:{{T/main}}template:{{T/main}}template:{{T/main}}template:T/maintemplate:T/main
-itemplate:T/maintemplate:{{T/main}}template:{{T/main}}template:{{T/main}}template:{{T/main}}template:{{T/main}}template:{{T/main}}template:{{T/main}}template:T/maintemplate:T/main
-ntemplate:T/maintemplate:{{T/main}}template:{{T/main}}template:{{T/main}}template:{{T/main}}template:{{T/main}}template:{{T/main}}template:{{T/main}}template:T/maintemplate:T/main
noT/main{{T/main}}{{T/main}}{{T/main}}{{T/main}}{{T/main}}{{T/main}}{{T/main}}T/mainT/main
no+Template:T/mainTemplate:{{T/main}}Template:{{T/main}}Template:{{T/main}}Template:{{T/main}}Template:{{T/main}}Template:{{T/main}}Template:{{T/main}}Template:T/mainTemplate:T/main
no+ltemplate:T/maintemplate:{{T/main}}template:{{T/main}}template:{{T/main}}template:{{T/main}}template:{{T/main}}template:{{T/main}}template:{{T/main}}template:T/maintemplate:T/main
no+itemplate:T/maintemplate:{{T/main}}template:{{T/main}}template:{{T/main}}template:{{T/main}}template:{{T/main}}template:{{T/main}}template:{{T/main}}template:T/maintemplate:T/main
no+ntemplate:T/maintemplate:{{T/main}}template:{{T/main}}template:{{T/main}}template:{{T/main}}template:{{T/main}}template:{{T/main}}template:{{T/main}}template:T/maintemplate:T/main
no-Template:T/mainTemplate:{{T/main}}Template:{{T/main}}Template:{{T/main}}Template:{{T/main}}Template:{{T/main}}Template:{{T/main}}Template:{{T/main}}Template:T/mainTemplate:T/main
no-ltemplate:T/maintemplate:{{T/main}}template:{{T/main}}template:{{T/main}}template:{{T/main}}template:{{T/main}}template:{{T/main}}template:{{T/main}}template:T/maintemplate:T/main
no-itemplate:T/maintemplate:{{T/main}}template:{{T/main}}template:{{T/main}}template:{{T/main}}template:{{T/main}}template:{{T/main}}template:{{T/main}}template:T/maintemplate:T/main
no-ntemplate:T/maintemplate:{{T/main}}template:{{T/main}}template:{{T/main}}template:{{T/main}}template:{{T/main}}template:{{T/main}}template:{{T/main}}template:T/maintemplate:T/main
[edit subpage]
Template links
List of templates using {{T/main}}
CodeResultNoteslock
{{T|example}}{{Example}}makes brackets part of the link; see docu
{{T0|example}}Examplejust link, without the brackets; see docu
{{T1|example}}{{Example}}inner brackets are part of the link; see docu
{{T2|example}}{{Example}}brackets are not a part of the link; see docu
{{Tl|example}}{{Example}}makes brackets around the link; see docu
{{Tls|example}}{{subst:example}}no parameters, adds "subst:"
Templates showing parameters Meta template {{Tle}} is easiest to parametrize.
{{​Tle​|T=F|p1=1|v1|p2=2|v2|p3=3|v3}}{{ F | 1 = v1 | 2 = v2 | 3 = v3 }}decribes template parameters by names and values
{{​Tlx​|example|1|2|3|4|5||7|8|9}}{{​example​|1|2|3|4|5|7|8|​...​}}up to 8 parameters
{{​Tlf​|example|1|2|3|...up to 8}}{{example|1|2|3|...up to 8}}up to 8 parameters, no link; see docu
{{​Tlc​|example|1|2|3|4|||7|up to 8|9}}{{example|1|2|3|4|||7|up to 8}}up to 8 parameters, no link,
<code>
style
{{​Tld​|example|1|2||3||}}{{example|1||2|3||}}up to 8 parameters,
<code>
style; see docu
{{Tlr|User:Example}}{{User:Example}}like {{tl}} but for any namespace
{{Tlsu|User:Example}}{{​subst​:​User:Example​}}like {{tlr}}, but also adds "subst:"
Alternative forms These ignore empty parameters.
{{​Tlp​|example|1|2|3|4|5||7|8|9}}{{​example​|1|2|3|4|5|7|8}}up to 8 parameters; ignores empty parms
{{Tl2|example|p1|p2}}
{{example|p1|p2}}
up to 2 parameters,
<code>
style; see docu
{{​Tlsp​|example|1|2|3|4|5|6|7|8|9}}{{​subst​:​example​|1|2|3|4|5|6|7|8|...}}up to 8 parameters, adds linked "subst:"; see doc
{{​Tlsx​|example|1|2|3|4|5|6|7|8|9}}
{{​subst​:​example​|1|2|3|4|5|​...​}}
up to 5 parameters, adds linked "subst:",
<code>
style
General-purpose formatting
Comparison of template-linking templates according to the styles of generated text and link produced
Text style ↓{{tlg}} options[note 1]
to achieve text style
Link style
LinkedUnlinkedLinked with substUnlinked with substLinked including braces
{{tlg}} options[note 1]
to achieve link style
N/ADEFAULTnolink=yessubst=yes
nolink=yes|subst=yes
braceinside=yes
normalDEFAULTN/A
codecode=yes
{{tl2}}
{{subst:tlsc}}[note 2]
<template link>
N/A
monospaceplaincode=yes[note 4]N/A
{{subst:tltts}}
N/A
kbdkbd=yes[note 5]
  1. a b c
    {{tlg}}
    is the most general template, allowing any combination of text style and/or link style options.
  2. a b c d e Prevents wrapping of text by placing it inside
    <span class​=​"nowrap"​>​...​</​span​>
    tags.
  3. a b c Allows links to templates in any namespace.

  4. {{tlg|plaincode=yes}} uses
    <code style="border: none; background-color: transparent;"​>​...​</​code​>
    .
  5. a b c d Displays monospaced font using
    <span style="font-family: monospace;"​>​...​</​span​>
    .

Last edited on 7 June 2019, at 00:06
Files are available under licenses specified on their description page. All structured data from the file namespace is available under the Creative Commons CC0 License; all unstructured text is available under the Creative Commons Attribution-ShareAlike License; additional terms may apply. By using this site, you agree to the Terms of Use and the Privacy Policy.
Privacy policy
Terms of Use
Desktop
HomeRandom Nearby Log inDonateAbout Wikimedia CommonsDisclaimers
WatchEdit