Template:LinkWikipedia: Difference between revisions

From LifeWiki
Jump to navigation Jump to search
These templates all seem to use different parameter names, sigh. Best to support 'em all.
Confocal (talk | contribs)
some dangerous spells
Line 1: Line 1:
<includeonly>* [https://{{{lang|en}}}.wikipedia.org/wiki/{{{entry|{{{1}}}}}} {{{name|{{{pagename|{{{patternname|{{PAGENAME}}}}}}}}}}}] at Wikipedia [[Category:Pages that link to Wikipedia]]</includeonly><noinclude>This is a template for including links to '''[https://en.wikipedia.org/wiki/Main_Page Wikipedia]''' in the "External Links" section of an article. It can take three parameters:
<includeonly>{{#if:{{{nobullet|}}}||*}}[https://{{{lang|en}}}.wikipedia.org/wiki/{{{entry|{{{1}}}}}} {{{name|{{{pagename|{{{patternname|{{PAGENAME}}}}}}}}}}}] at Wikipedia [[Category:Pages that link to Wikipedia]]</includeonly><noinclude>This is a template for including links to '''[https://en.wikipedia.org/wiki/Main_Page Wikipedia]''' in the "External Links" section of an article. It can take three parameters:


* ''entry'', which specifies the title of the entry linked to (parameter name may be omitted);
* ''entry'', which specifies the title of the entry linked to (parameter name may be omitted);
Line 6: Line 6:
* ''lang'', which specifies the language code of the Wikipedia edition to link to (default: ''en'').
* ''lang'', which specifies the language code of the Wikipedia edition to link to (default: ''en'').


Here is a simple example of its usage:
==Examples of usage==


'''You type:'''
'''You type:'''
Line 14: Line 14:
'''You see:'''
'''You see:'''


* [https://en.wikipedia.org/wiki/Conway's_Game_of_Life Life] at Wikipedia
{{LinkWikipedia|Conway's_Game_of_Life|name=Life}}
 
'''You type:'''
 
<tt><nowiki>...{{LinkWikipedia|Conway's_Game_of_Life|name=Life|nobullet=nobullet}}...</nowiki></tt>
 
'''You see:'''
 
...{{LinkWikipedia|Conway's_Game_of_Life|name=Life|nobullet=nobullet}}...
 
'''You type:'''
 
<tt><nowiki>...Conway's Game of Life<ref>{{LinkWikipedia|Conway's_Game_of_Life|name=Life|nobullet=nobullet}}</ref>...</nowiki></tt>
 
'''You see:'''
 
...Conway's Game of Life<ref>{{LinkWikipedia|Conway's_Game_of_Life|name=Life|nobullet=nobullet}}</ref>...
 
==References==
<references/>


==See also==
==See also==

Revision as of 10:00, 31 May 2022

This is a template for including links to Wikipedia in the "External Links" section of an article. It can take three parameters:

  • entry, which specifies the title of the entry linked to (parameter name may be omitted);
    • Note that for technical reasons, this may not contain spaces; use underscores instead.
  • name, which specifies the name of the entry as it will appear in the link text (default: name of the current article);
  • lang, which specifies the language code of the Wikipedia edition to link to (default: en).

Examples of usage

You type:

{{LinkWikipedia|Conway's_Game_of_Life|name=Life}}

You see:


You type:

...{{LinkWikipedia|Conway's_Game_of_Life|name=Life|nobullet=nobullet}}...

You see:

...Life at Wikipedia ...

You type:

...Conway's Game of Life<ref>{{LinkWikipedia|Conway's_Game_of_Life|name=Life|nobullet=nobullet}}</ref>...

You see:

...Conway's Game of Life[1]...

References

  1. ↑ Life at Wikipedia

See also