Changes

Jump to navigation Jump to search
m
Reverted edits by Onehit779 (talk) to last revision by ExE Boss
<noinclude>__TOC__
</noinclude><span style="float:right" class="editsection"><nowiki>[</nowiki>{{Edit-int|Commons:Link templates/Template links}} subpage<nowiki>]</nowiki></span>
== Template links ==
{| class="wikitable" style="margin: 1em auto; clear: both;"
|+ List of templates using {{tld|T/main}}
! Code !! Result !! Notes !! lock
{{txrow|t|example}} || makes brackets part of the link; see [[Template:T/doc|docu]] || [[File:Lock-r.svg]]
{{txrow|t0|example}} || just link, without the brackets; see [[Template:T/doc|docu]] || [[File:Lock-g.svg]]
{{txrow|t1|example}} || inner brackets are part of the link; see [[Template:T/doc|docu]] || [[File:Lock-g.svg]]
{{txrow|t2|example}} || brackets are not a part of the link; see [[Template:T/doc|docu]] || [[File:Lock-g.svg]]
{{txrow|tl|example|style-r=border-bottom:2px solid #888}} || makes brackets around the link; see [[Template:T/doc|docu]] || [[File:Lock-r.svg]]
{{txrow|tls|example}} || no parameters, adds "subst:" || [[File:Lock-r.svg]]
|-
!colspan=4 text-align="left"|Templates showing parameters {{0}} ''{{nobold|Meta template {{Tl|Tle|i=4}} is easiest to parametrize.}}''
{{txrow|tle|2=T=F|3=p1=1|4=v1|5=p2=2|6=v2|7=p3=3|8=v3|example=<!-- {{Tle|T=F|p1=1|v1|p2=2|v2|p3=3|v3}} -->&#123;&#123;&#160;<tt>{{T0|F}}</tt> &#124; {{#tag:span|1|style=font-family:Courier,sans;font-size:110%}}&#160;=&#160;{{#tag:span|v1|style=font-family:Verdana,serif;font-style:italic;font-size:96%}} &#124; {{#tag:span|2|style=font-family:Courier,sans;font-size:110%}}&#160;=&#160;{{#tag:span|v2|style=font-family:Verdana,serif;font-style:italic;font-size:96%}} &#124; {{#tag:span|3|style=font-family:Courier,sans;font-size:110%}}&#160;=&#160;{{#tag:span|v3|style=font-family:Verdana,serif;font-style:italic;font-size:96%}}&#160;&#125;&#125;}} || decribes template parameters by names and values || [[File:Lock-g.svg]]
{{txrow|tlx|example|1|2|3|4|5||7|8|9}} || up to 8 parameters || [[File:Lock-r.svg]]
{{txrow|tlf|example|1|2|3|...up to 8|example={{tlf|example|1|2|3|...up to 8}}}} || up to 8 parameters, no link; see [[Template:Tlf/doc|docu]] || [[File:Lock-r.svg]]
{{txrow|tlc|example|1|2|3|4|||7|up to 8|9}} || up to 8 parameters, no link, <syntaxhighlight inline lang="html"><code></syntaxhighlight> style || [[File:Lock-g.svg]]
{{txrow|tld|example|1|2||3|||example={{tld|example|1||2|3||}}}} || up to 8 parameters, <syntaxhighlight inline lang="html"><code></syntaxhighlight> style; see [[Template:Tld/doc|docu]] || [[File:Lock-g.svg]]
{{txrow|tlr|User:Example}} || like {{tlf|tl}} but for any namespace || [[File:Lock-g.svg]]
{{txrow|tlsu|User:Example}} || like {{tlf|tlr}}, but also adds "subst:" || [[File:Lock-g.svg]]
|-
!colspan=4 text-align="left"|Alternative forms {{0}} ''{{nobold|These ignore empty parameters.}}''
{{txrow|tlp|example|1|2|3|4|5||7|8|9}} || up to 8 parameters; ignores empty parms || [[File:Lock-r.svg]]
{{txrow|tl2|example|p1|p2}} || up to 2 parameters, <syntaxhighlight inline lang="html"><code></syntaxhighlight> style; see [[Template:Tl2/doc|docu]] || [[File:Lock-g.svg]]
{{txrow|tlsp|example|1|2|3|4|5|6|7|8|9}} || up to 8 parameters, adds linked "subst:"; see [[Template:Tlsp/doc|doc]] || [[File:Lock-g.svg]]
{{txrow|tlsx|example|1|2|3|4|5|6|7|8|9}} || up to 5 parameters, adds linked "subst:", <syntaxhighlight inline lang="html"><code></syntaxhighlight> style || [[File:Lock-g.svg]]
|}

=== General-purpose formatting ===
<div style="overflow-x: auto; margin: 1em 0; clear: both;">
{| class="wikitable plainrowheaders" style="margin: 0 auto; width: auto;"
|+ Comparison of template-linking templates according to the styles of generated text and link produced
|- style="background-color: #fee;"
! scope="col" rowspan="2" | Text style ↓
! scope="col" rowspan="2" | {{tld|tlg}} options{{NoteTag|name="TlTfn1"}}<br/>to achieve text style
! scope="col" colspan="5" | Link style
|- style="background-color: #fee;"
! scope="col" | Linked
! scope="col" | Unlinked
! scope="col" | Linked with subst
! scope="col" | Unlinked with subst
! scope="col" | Linked including braces
|-
! scope="row" style="font-weight: bold; text-align: center;" | {{tld|tlg}} options{{NoteTag|name="TlTfn1"}}<br/>to achieve link style
| {{n/a}}
| {{n/a|DEFAULT}}
| {{code|nolink{{=}}yes}}
| {{code|subst{{=}}yes}}
|| <code>nolink=yes<wbr/>|subst=yes</code>
| {{code|braceinside{{=}}yes}}
|-
! scope="row" style="font-weight: normal; text-align: left;" | normal
| {{n/a|DEFAULT}}
| {{Unbulleted list
| {{tlg|tlg}}<wbr/>{{NoteTag|name="TlTfn1"}}
| {{T2|T2}}
| {{tlx|tlx}}
| {{tlp|tlp|1|2|...}}<wbr/>{{NoteTag|name="TlTfn2"}}
| {{tlr|Template:tlr}}<wbr/>{{NoteTag|name="TlTfn3"}}
| {{tlu|Template:tlu}}<wbr/>{{NoteTag|name="TlTfn3"}}
}}
| {{Unbulleted list
| {{tlf|tlf}}<wbr/>{{NoteTag|name="TlTfn2"}}<br/><sup><[[Template:tlf|template link]]></sup>
}}
| {{Unbulleted list
| {{tls|tls}}
| {{tlsp|tlsp}}
| {{tlsu|Template:tlsu}}<wbr/>{{NoteTag|name="TlTfn3"}}
}}
| {{n/a}}
| {{Unbulleted list
| {{T|T}}
}}
|-
! scope="row" style="font-weight: normal; text-align: left;" | <code>code</code>
| {{code|code{{=}}yes}}
| {{Unbulleted list
| {{tl2|tl2}}<wbr/>{{NoteTag|name="TlTfn2"}}
}}
| {{Unbulleted list
| {{tlc|tlc}}<wbr/>{{NoteTag|name="TlTfn2"}}<br/><sup><[[Template:tlc|template link]]></sup>
}}
| {{Unbulleted list
| {{tlsx|tlsx}}
}}
| {{Unbulleted list
| {{tlsc|tlsc}}<wbr/>{{NoteTag|name="TlTfn2"}}<br/><sup><[[Template:tlsc|template link]]></sup>
}}
| {{n/a}}
|-
! scope="row" style="font-weight: normal; text-align: left;" | <span style="font-family:monospace; font-size:larger;">monospace</span>
| {{code|plaincode{{=}}yes}}<wbr/>{{NoteTag|name="TlTfn4"}}
| rowspan="2" | {{Unbulleted list
| {{tld|tld}}<wbr/>{{NoteTag|name="TlTfn5"}}
}}
| rowspan="2" {{n/a}}
| rowspan="2" | {{Unbulleted list
| {{tltts|tltts}}<wbr/>{{NoteTag|name="TlTfn5"}}
}}
| rowspan="2" {{n/a}}
| rowspan="2" | {{Unbulleted list
| {{tl|tl}}<wbr/>{{NoteTag|name="TlTfn5"}}
}}
|-
! scope="row" style="font-weight: normal; text-align: left;" | <kbd>kbd</kbd>
| {{code|kbd{{=}}yes}}<wbr/>{{NoteTag|name="TlTfn5"}}
|}
</div>
{{Reflist|group=note|refs=
{{NoteTag|name="TlTfn1"|1={{tl2|tlg}} is the most general template, allowing any combination of text style and/or link style options.}}
{{NoteTag|name="TlTfn2"|1=Prevents wrapping of text by placing it inside <syntaxhighlight inline lang="html"><span class="nowrap">...</span></syntaxhighlight> tags.}}
{{NoteTag|name="TlTfn3"|1=Allows links to templates in any namespace.}}
{{NoteTag|name="TlTfn4"|1={{tlc|tlg|plaincode{{=}}yes}} uses [[w:HTML element#code|<syntaxhighlight inline lang="html"><code style="border: none; background-color: transparent;">...</code></syntaxhighlight>]].}}
{{NoteTag|name="TlTfn5"|1=Displays monospaced font using <syntaxhighlight inline lang="html"><span style="font-family: monospace;">...</span></syntaxhighlight>.}}
}}<noinclude>
{{Documentation}}
</noinclude>
Anonymous user

Navigation menu