Difference between revisions of "Template:w"
(apply {{ucfirst:}} to link target, to make the “have I visited that page before” link style more accurate) |
(The "at Wikipedia" part is not needed) |
||
Line 3: | Line 3: | ||
-->{{#if:{{{1|}}}<!-- | -->{{#if:{{{1|}}}<!-- | ||
-->|{{ucfirst:{{{1}}}}}{{!}}{{{2|{{{1|}}}}}}]]<!-- | -->|{{ucfirst:{{{1}}}}}{{!}}{{{2|{{{1|}}}}}}]]<!-- | ||
− | -->|{{ucfirst:{{PAGENAME}}}}{{!}}{{PAGENAME}} | + | -->|{{ucfirst:{{PAGENAME}}}}{{!}}{{PAGENAME}}]]<!-- |
-->}}<!-- | -->}}<!-- | ||
--></includeonly><noinclude> | --></includeonly><noinclude> |
Latest revision as of 10:26, 29 August 2023
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|Page}}
links to the wikipedia article on "Page"{{w|Page|Display}}
prints "Display" which links to the wikipedia article on "Page"
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.)