Difference between revisions of "Template:w"

Explain xkcd: It's 'cause you're dumb.
Jump to: navigation, search
(That was a terrible idea)
Line 2: Line 2:
 
-->[[wikipedia:<!--
 
-->[[wikipedia:<!--
 
  -->{{#if:{{{1|}}}<!--
 
  -->{{#if:{{{1|}}}<!--
   -->|{{ucfirst:{{{1}}}}}{{!}}{{{2|{{{1|}}}}}}]]<!--
+
   -->|{{ucfirst:{{{1}}}}}{{!}}<span title="{{{2|{{{1}}}}}} on Wikipedia">{{{2|{{{1}}}}}}</span>]]<!--
   -->|{{ucfirst:{{PAGENAME}}}}{{!}}{{PAGENAME}}]]<!--
+
   -->|{{ucfirst:{{PAGENAME}}}}{{!}}<span title="{{PAGENAME}} on Wikipedia">{{PAGENAME}}</span>]]<!--
 
  -->}}<!--
 
  -->}}<!--
 
--></includeonly><noinclude>
 
--></includeonly><noinclude>

Revision as of 09:10, 27 July 2025

A template to make a link to Wikipedia.

Usage

{{w}} by itself links to the Wikipedia page for the page you use the template on

{{w|Name}} links to the Wikipedia article on "Name"

{{w|Name|Display}} prints "Display" which links to the Wikipedia article on "Name"

The first character of the link target is automatically capitalized, such that e.g. {{w|xkcd}} (xkcd) and {{w|Xkcd|xkcd}} (xkcd) both link to the same URL. (Wikipedia page titles never start with a lowercase character, though they can display with alternative capitalization.) xkcd.com