Template:W: Difference between revisions

From LDraw.org Wiki
Jump to navigation Jump to search
(Created page with "<span class="plainlinks">[http://{{{lang|en}}}.wikipedia.org/wiki/{{{page}}} {{{text|page}}}]</span><noinclude> ==Usage== <pre style="overflow:auto">{{w|page=|text=|lang=}}</p...")
 
m (Minor code fix)
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
<span class="plainlinks">[http://{{{lang|en}}}.wikipedia.org/wiki/{{{page}}} {{{text|page}}}]</span><noinclude>
<span class="plainlinks">[http://{{{lang|en}}}.wikipedia.org/wiki/{{{page}}} {{{text|{{{page}}}}}}]</span><noinclude>
==Usage==
==Usage==
<pre style="overflow:auto">{{w|page=|text=|lang=}}</pre>
<pre style="overflow:auto">{{w|page=|text=|lang=}}</pre>
Line 7: Line 7:


'''page'''
'''page'''
:This parameter is mandatory and must be the existing Wikipedia article to be linked to. The page name can be entered with or without the {{code|_}} character.
:This parameter is mandatory and must be the existing Wikipedia article to be linked to. The article name must be entered with the {{code|_}} (underscore) characters as shown in the article's URL, e.g {{code|Lego_Digital_Designer}}.


'''text'''
'''text'''
:This parameter is optional and can be used to show text other than the name of the Wikipedia article.
:This parameter is optional and can be used to show text other than the name of the Wikipedia article.
:If not specified, this parameter defaults to {{code|page}}
:If not specified, this parameter defaults to the supplied {{code|<nowiki>|page=</nowiki>}} parameter.


'''lang'''
'''lang'''
:This parameter is optional and is used for linking to non-English Wikipedia articles. The {{code|lang}} field is set as shown in the site address, e.g. use {{code|nl}} for the Dutch-language site: {{code|<nowiki>nl.wikipedia.org</nowiki>}}.
:This parameter is optional and is used for linking to non-English Wikipedia articles. The {{code|lang}} field is set as shown in the site address, e.g. use {{code|nl}} for the Dutch-language site: {{code|<nowiki>nl.wikipedia.org</nowiki>}}.
:If not specified, this parameter defaults to {{code|en}}.
:If not specified, this parameter defaults to {{code|<nowiki>|lang=en</nowiki>}}.


==Examples==
==Examples==

Latest revision as of 17:49, 19 January 2015

{{{page}}}

Usage

{{w|page=|text=|lang=}}

This template allows the creation of an interwiki-style link to Wikipedia, but does not display the "arrow" icon normally associated with a link. It can be used in infoboxes where the arrow icon is not necessarily desired.

As these parameters are "named", they do not have to be listed in a particular order.

page

This parameter is mandatory and must be the existing Wikipedia article to be linked to. The article name must be entered with the _ (underscore) characters as shown in the article's URL, e.g Lego_Digital_Designer.

text

This parameter is optional and can be used to show text other than the name of the Wikipedia article.
If not specified, this parameter defaults to the supplied |page= parameter.

lang

This parameter is optional and is used for linking to non-English Wikipedia articles. The lang field is set as shown in the site address, e.g. use nl for the Dutch-language site: nl.wikipedia.org.
If not specified, this parameter defaults to |lang=en.

Examples

{{w|page=MLCAD}}

The above will create a link to the Wikipedia article on MLCAD.

{{w|page=MLCAD|text=Mike's LEGO CAD}}

The above will create a link to the Wikipedia article on MLCAD, displaying the text "Mike's LEGO CAD".

{{w|page=MLCAD|lang=nl}}

The above will create a link to the Dutch-language Wikipedia article on MLCAD.

{{w|page=MLCAD|text=Mike's LEGO CAD|lang=nl}}

The above will create a link to the Dutch-language Wikipedia article on MLCAD, displaying the text "Mike's LEGO CAD".