Template:W: Difference between revisions
Jump to navigation
Jump to search
m (but this isn't quite working?) |
m (small tweaks) |
||
(3 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
<includeonly>[[wikipedia:{{{1}}}|<span title={{{ | <includeonly>[[wikipedia:{{{1}}}|{{#if:{{{span|}}}|<span title="{{{span}}}">{{{2|{{{1}}}}}}</span>|{{{2|{{{1}}}}}}}}]]</includeonly><noinclude> | ||
=== Description === | === Description === | ||
This template is designed to create in-line references to Wikipedia pages. | This template is designed to create in-line references to Wikipedia pages. | ||
=== Usage === | === Usage === | ||
To use this template, place <nowiki>{{w|<page>}}</nowiki> in an entry where | To use this template, place <code><nowiki>{{w|<page>}}</nowiki></code> in an entry where <code><page></code> is an article on Wikipedia. | ||
For example, | For example, | ||
Line 14: | Line 14: | ||
:S: Our guest tonight is {{w|James Randi}}. | :S: Our guest tonight is {{w|James Randi}}. | ||
To change the displayed text of the link, | |||
To change the displayed text of the link, add the alternate text after a pipe, <code>|</code>. For example, | |||
<nowiki>{{w|John Rennie (editor)|John Rennie}}</nowiki>. | <nowiki>{{w|John Rennie (editor)|John Rennie}}</nowiki>. | ||
Line 20: | Line 22: | ||
will produce | will produce | ||
:{{w|John Rennie (editor)|John Rennie | :{{w|John Rennie (editor)|John Rennie}}. | ||
It is not necessary to "escape" special characters such as "()#" or replace spaces with underscores ("_"). | It is not necessary to "escape" special characters such as "()#" or replace spaces with underscores ("_"). |
Latest revision as of 16:55, 16 May 2023
Description
This template is designed to create in-line references to Wikipedia pages.
Usage
To use this template, place {{w|<page>}}
in an entry where <page>
is an article on Wikipedia.
For example,
S: Our guest tonight is {{w|James Randi}}.
will produce
- S: Our guest tonight is James Randi.
To change the displayed text of the link, add the alternate text after a pipe, |
. For example,
{{w|John Rennie (editor)|John Rennie}}.
will produce
It is not necessary to "escape" special characters such as "()#" or replace spaces with underscores ("_").
Note that you can produce a link to Wikipedia's main page by using the format
{{w||Wikipedia}}
producing