Template:W: Difference between revisions

From SGUTranscripts
Jump to navigation Jump to search
(Add template for linking to wikipedia, shamelessly cribbed from other wikis)
 
m (small tweaks)
 
(7 intermediate revisions by 3 users not shown)
Line 1: Line 1:
<includeonly>[[wikipedia:{{{1}}}|{{{2|{{{1}}}}}}]]</includeonly><noinclude>
<includeonly>[[wikipedia:{{{1}}}|{{#if:{{{span|}}}|<span title="{{{span}}}">{{{2|{{{1}}}}}}</span>|{{{2|{{{1}}}}}}}}]]</includeonly><noinclude>
=== 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 "<page>" is an article on Wikipedia.
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 11: Line 12:
will produce
will produce


:S: Our guest tonight is {{w|James Randi}}''.
:S: Our guest tonight is {{w|James Randi}}.


To change the displayed text of the link, use a third parameter. For example,
 
 
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 19: 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

John Rennie.

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

Wikipedia