Commons:Link templates

From Wikimedia Commons, the free media repository
Jump to navigation Jump to search

[edit subpage]

Category link[edit]

Code Result Equivalent
Categories existing on Commons

{{C|Link templates}}

Link templates[[:Category:Link templates|Link templates]]

{{C|Link templates|Display name}}

Display name[[:Category:Link templates|Display name]]

{{C|Link templates|3=X}}

Link templates[[:Category:Link templates|Link templates]]

{{C|Link templates|3=x}}

Link templates[[:Category:Link templates|Link templates]]

{{C|Link templates|3=B}}

[[Link templates]](special output display)

{{C|Link templates|3=-}}

Category:Link templates(special output display)

{{C|Link templates|3=+}}

Category:Link templates(special output display)

{{Cl|Link templates}}

Category:Link templates[[:Category:Link templates]]
Categories NOT existing on Commons

{{C|Category name}}

Category name[[:Category:category name|category name]]

{{C|Category name|Display name}}

Display name[[:Category:Category name|Display name]]

{{C|Category name|3=X}}

Category name(special output display)

{{C|Category name|3=x}}

Category name(special output display)

{{C|PowerHaus|3=X}}

PowerHaus(not-empty not-existing category)

{{C|PowerHaus|3=x}}

PowerHaus(not-empty not-existing category)

{{C|Category name|3=x}}

[[Category:Category name]](special output display)

{{Cl|Category name}}

Category:Category name[[:Category:Category name]]
Categories on other wikis (e.g. below on Portuguese Wikipedia), existence not tested

{{C|!Predefinições por função|Predefs|pt}}

Predefs[[:pt:Category:!Predefinições por função|Predefs]]

{{C|XyzXyz||pt}}

XyzXyz[[:pt:Category:XyzXyz]]

[edit subpage]

File (image) / media links[edit]

Code Result

{{F|Example.jpg|DisplayName|16}}

DisplayName

{{Im|Example.jpg}}

Example.jpg

{{Lim|Example.jpg}}

File:Example.jpg (edit|talk|history|links|watch|logs)

{{Idl|Example.jpg}}

File:Example.jpg (edit talk history logs links usage del)

{{Il|Example.jpg}}

File:Example.jpg (edit · last · history · watch · unwatch · global usage · logs · purge · w · search · links · DR · del · undel · Delinker log)

{{Media|Example.ogg}}

Example.ogg (info)

{{Mli|Example.ogg}}

( )

{{Mli|Example.ogg|file}}

(file )

{{Audio|Example.ogg|File name}}

File name

{{Audio2|Example.ogg|File name}}

File name (listen)

[edit subpage]

General Interwiki link[edit]

Template {{W}} - examples short Result links to
{{w||en:WP}} {{W}} en:WP en:Main page
{{w|Braille#Lletres i nombres||ca)}} Braille#Lletres i nombres ca:article page
{{w|template:Commonscat||de}} {{Wd|template:Commonscat}} template:Commonscat de:Vorlage:Commonscat
{{w|category:Liste d'artistes||fr}} {{Wf|category:Liste d'artistes}} category:Liste d'artistes fr:Catégorie:Liste d'artistes
{{w|file:Coverkill.jpg||pt}} {{Wp|file:Coverkill.jpg}} file:Coverkill.jpg pt:Ficheiro:Coverkill.jpg
{{w|user:Feketetomi||hu}} {{Wh|user:Feketetomi}} user:Feketetomi hu:Szerkesztő:Feketetomi
{{w|talk:Merano#Rino Gaetano e Merano|3=it)}} {{Wi|talk:Merano#Rino Gaetano e Merano)}} talk:Merano#Rino Gaetano e Merano it:Discussione:Merano
{{w|Carnivora||wikispecies)}} {{W|Carnivora||species)}} Carnivora Wikispecies:Carnivora

In all Wikis, the English namespaces (e.g. file, user) work as well as the different national ones.

{{Multilingual link}} creates a link to Wikipedia article in user's interface language.

[edit subpage]

Template links[edit]

List of templates using {{T/main}}
Code Result Notes lock

{{T|example}}

{{Example}} makes brackets part of the link; see docu

{{T0|example}}

Example just 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 0 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 0 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[edit]

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
Linked Unlinked Linked with subst Unlinked with subst Linked including braces
{{tlg}} options[note 1]
to achieve link style
N/A DEFAULT nolink=yes subst=yes nolink=yes|subst=yes braceinside=yes
normal DEFAULT N/A
code code=yes
N/A
monospace plaincode=yes[note 4] N/A
N/A
kbd kbd=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>.

User and user talk links[edit]

Code Result [1] Shortcut

{{U|Username}}

Username     links to user page

{{Uc|Username}}

Username     conditional link to contributions page

{{Ud|Username}}

Username     links to German user page =
{{Ue|Username}} Username     links to English user page (not yet a template) =

{{Un|Username}}

‍Username     does not link to user page; no echo function

{{Ut|Username}}

Username     links to user talk page

{{Uw|Username}}

Username     trails the given name with "~commonswiki"

{{Uwt|Username}}

Username     links to the talk page of "~commonswiki" user

{{Userlist|Username}}

Username     Lua based list of one or more users {{ Ul }}
WWW Combinations:

{{UL2.0|Username}}

Username (talk)Customizable template

{{Ult|Username}}

Username (talk)

{{User|Username}}

Username (talk · contribs)

{{Uv|Username|:en:}}

:en:Username (talk | contribs) ~

{{User2|Username}}

Username (talk · contributions · Statistics)

{{User3|Username}}

Username (talk · contributions · Move log · block log · uploads · Abuse filter log {{Vandal}}

{{User6|Username}}

Username (talk · contributions · Move log · Statistics · logs · block log)

{{User7|Username}}

Username (talk · contributions · user rights management)

{{User8|Username}}

Username (talkcontribsblock logfilter log)

{{User13|Username}}

Username (talk · contribs · logs · block log)

{{User14|Username}}

Username (talk · contributions · deleted user contributions · recent activity · logs · block log · global contribs · CentralAuth)

{{User21|Username}}

Username (talk · contribs · count · global contribs)

{{Userlinks|Username}}

Username (talk · contribs · deleted contribs · logs · edit filter log · block user · block log)

{{Admin|Username}}

Username (talk contribs blocks protections deletions moves rights rights changes) {{ A }}

{{UserSUL|Username}}

Username (talk • contribs • rename user)

{{BotUser|Username}}

Username (contribs)

{{Newbot|Username}}

taskscontribscountlogspage moves block user block logflag logglobal contribsflag bot

{{Checkuser|Username}}

Username (talk contribs Luxo's SUL deleted contribs logs block user block log )
  1. Interwiki template: Interwiki access (with 3=language code)

Be aware that other templates may use the parameter "editor" or "by" for the same purpose.