Difference between revisions of "Template:w"
(The "at Wikipedia" part is not needed) |
m |
||
| Line 6: | Line 6: | ||
-->}}<!-- | -->}}<!-- | ||
--></includeonly><noinclude> | --></includeonly><noinclude> | ||
| − | A template to make a link to Wikipedia.<! | + | A template to make a link to Wikipedia.<!- For a tag to have "at [[Wikipedia:|Wikipedia]]" without being a link to the page name, use {{tl|wat}} - this is useful for see-also lists.--> |
==Usage== | ==Usage== | ||
*<code><nowiki>{{w}}</nowiki></code> by itself links to the wikipedia page for the page you use the template on | *<code><nowiki>{{w}}</nowiki></code> by itself links to the wikipedia page for the page you use the template on | ||
**{{w}} | **{{w}} | ||
| − | *<code><nowiki>{{w|Page}}</nowiki></code> links to the | + | *<code><nowiki>{{w|Page}}</nowiki></code> links to the Wikipedia article on "Name" |
| − | **{{w| | + | **{{w|Name}} |
| − | *<code><nowiki>{{w|Page|Display}}</nowiki></code> prints "Display" which links to the | + | *<code><nowiki>{{w|Page|Display}}</nowiki></code> prints "Display" which links to the Wikipedia article on "Name" |
| − | **{{w| | + | **{{w|Name|Display}} |
The first character of the link target is automatically capitalized, such that e.g. <code><nowiki>{{w|xkcd}}</nowiki></code> ({{w|xkcd}}) and <code><nowiki>{{w|Xkcd|xkcd}}</nowiki></code> ({{w|Xkcd|xkcd}}) both link to the same URL. (Wikipedia page titles never start with a lowercase character, though {{w|WP:DISPLAYTITLE|they can display with alternative capitalization}}.) | The first character of the link target is automatically capitalized, such that e.g. <code><nowiki>{{w|xkcd}}</nowiki></code> ({{w|xkcd}}) and <code><nowiki>{{w|Xkcd|xkcd}}</nowiki></code> ({{w|Xkcd|xkcd}}) both link to the same URL. (Wikipedia page titles never start with a lowercase character, though {{w|WP:DISPLAYTITLE|they can display with alternative capitalization}}.) | ||
Revision as of 13:06, 12 April 2025
A template to make a link to Wikipedia.<!- For a tag to have "at Wikipedia" without being a link to the page name, use {{wat}} - this is useful for see-also lists.-->
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 "Name"{{w|Page|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.)
