Commons:Link templates

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

[edit subpage]

Category link[edit]

Code Result Equivalent
existing categories

{{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|!Predefinições por função|Predefs|pt}}

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

{{Cl|Link templates}}

Category:Link templates[[:Category:Link templates]]
NOT existing categories

{{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 namespecial output display

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

[[Category:category name]]special output display

{{C|XyzXyz||pt}}

XyzXyz[[:pt:Category:XyzXyz]]

{{Cl|category name}}

Category:Category name[[:Category:Category name]]

[edit subpage]

File (image) / media links[edit]

Code Result

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

DisplayNameExample.jpg

{{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 (listenplay in browser)

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

[edit subpage]

Template links[edit]

Code Result Notes lock

{{T|example}}

{{Example}} makes brackets part of the link; see docu Lock-r.svg

{{T0|example}}

Example just link, without the brackets; see docu Lock-g.svg

{{T1|example}}

{{Example}} inner brackets are part of the link; see docu Lock-g.svg

{{T2|example}}

{{Example}} brackets are not a part of the link; see docu Lock-g.svg

{{Tl|example}}

{{Example}} makes brackets around the link; see docu Lock-r.svg

{{Tls|example}}

{{subst:example}} no parameters, adds "subst:" Lock-r.svg
Templates showing parameters 0 Meta template {{Tle}} is easiest to parametrize.

{{Tle|T=v|p1=1|v1|p2=2|v2|p3=3|v3}}

{{ V | 1 = v1 | 2 = v2 | 3 = v3 }} decribes template parameters by names and values Lock-g.svg

{{Tlx|example|1|2|3|4|5||7|8|9}}

{{example|1|2|3|4|5|7|8|...}} up to 8 parameters Lock-r.svg

{{Tlxs|example|1|2|3|4|5||7|8|9}}

{{subst:example|1|2|3|4|5||7|8|...}} up to 8 parameters, adds "subst:"; see docu Lock-g.svg

{{Tlf|example|1|2|3|...up to 8}}

{{example|1|2|3|...up to 8}} up to 8 parameters, no link; see docu Lock-r.svg

{{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 Lock-g.svg

{{Tld|example|1|2||3||}}

{{example|1||2|3||}} up to 8 parameters, <code> style; see docu Lock-g.svg

{{Tlr|User:Example}}

{{User:Example}} like {{tl}} but for any namespace Lock-g.svg
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 Lock-r.svg

{{Tl2|example|p1|p2}}

{{example|p1|p2}} up to 2 parameters, <code> style; see docu Lock-g.svg

{{Tlsp|example|1|2|3|4|5}}

{{subst:example|1|2|3|etc.}} up to 3 parameters, adds linked "subst:" Lock-g.svg

{{Tlsx|example||2|3||6|7|8}}

{{subst:example|2|3|6|...}} up to 5 parameters, adds linked "subst:", teletype style Lock-g.svg

User and user talk links[edit]

Important: Always specify the user names without the namespace
Code Result [1] Shortcut

{{U|Username}}

Username     links to user page

{{Ud|Username}}

Username     links to German user page =

{{Ut|Username}}

Username     links to user talk page

{{Uc|Username}}

Username     conditional link to contributions page

{{Uw|Username}}

Username     trails the given name with "~commonswiki"

{{Uwt|Username}}

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

{{U|Username|link=no}}

‍Username     does not link to user page
WWW Combinations:

{{Ult|Username}}

Username (talk)

{{User|Username}}

Username (talk · contribs)

{{Uv|Username|:en:}}

:en:Username (talk | contribs) ~

{{User2|Username}}

Username (talk · contributions · Number of edits)

{{User3|Username}}

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

{{User6|Username}}

Username (talk · contributions · Move log · Number of edits · 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 • SUL utility)

{{BotUser|Username}}

User: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.