Difference between revisions of "Template:W"

From "PTTLink Wiki"
Jump to navigation Jump to search
Mediawiki>JJMC89
(fix when second parameter is empty)
 
Mediawiki>Majora
(Fulfilling edit request)
Line 1: Line 1:
[[{{{1}}}|{{if empty|{{{2|}}}|{{{1}}}}}]]<noinclude>
+
{{#switch:{{padleft:|1|{{{1|}}}}}|&#91;|&#123;=[[Category:Maintenance:Template W error]]{{color|red|'''Template W: parameter error'''}}<!--
{{Documentation}}</noinclude>
+
-->|{{#switch:{{{link}}}|no|n|-={{#if:{{{2|}}}|{{{2}}}|{{{1}}}}}<!-- option for only text without link
 +
-->|[[:{{{3|w}}}:{{{1|}}}|{{<includeonly>safesubst:</includeonly>#if: {{{2|}}}|{{{2}}}<!--
 +
 
 +
-->|{{#if:{{NAMESPACE:{{{1|}}}}}|{{NAMESPACE:{{{1|}}}}}''''':'''''{{PAGENAME:{{{1|{{Projectname|w}}}}}}}<!-- &#58;
 +
-->|{{#ifeq:{{padleft:|1|{{{1|W}}}}}|{{lc:{{padleft:|1|{{PAGENAME:{{{1|W}}}}}}}}}<!--"ℓ"
 +
-->|{{lcfirst:{{PAGENAME:{{{1|{{Projectname|w}}}}}}}}}<!-- first character lower case
 +
-->|{{PAGENAME:{{{1|{{Projectname|w}}}}}}}<!--
 +
-->}}}}}}]]}}}}<noinclude>
 +
{{documentation}}
 +
</noinclude>

Revision as of 00:07, 29 June 2019

[[:w:|]]

Template documentationview · edit · history · purge ]
This documentation is transcluded from Template:W/doc.

Usage

File:Template W for welcome.png
This template was previously a redirect to {{Welcome}}, but this causes chaos when bots copy Commons images for temporary upload here. (Click to enlarge).

Template {{W}} is widely used on Wikimedia sister projects to form the interwiki link: [[w:{{{1}}} | {{{2|{{{1}}}}}} ]]

  • Its use here allows images and other text snippets (descriptions for Commons category headings, for example) to be composed.
  • It is particularly useful in annotating images marked by a bot as being eligible for transfer before adding |user=username to enable a bot move to take place.

See also