Difference between revisions of "Template:Link"
Jump to navigation
Jump to search
(template is created [it would be better to have the documentation on a subpage and include it here, but this is impossible because Parser Functions are not installed]) |
(the documentation is now on a subpage) Tag: Replaced |
||
Line 1: | Line 1: | ||
− | <includeonly>[[{{{2|wikipedia}}}:{{{1|Article}}}|{{{1|Article}}}]]</includeonly><noinclude>{{doc |
+ | <includeonly>[[{{{2|wikipedia}}}:{{{1|Article}}}|{{{1|Article}}}]]</includeonly><noinclude>{{doc}} |
− | |||
− | == Usage == |
||
− | The template accepts two unnamed parameters: |
||
− | # Name of the article, default value: '''Article'''. |
||
− | # Prefix (code name of the site), one of the listed in the second table (see below), default value: '''wikipedia'''. |
||
− | |||
− | {| class="wikitable" |
||
− | ! code !! result !! the link points to |
||
− | |- |
||
− | | <code><nowiki>{{link|foo|wikt}}</nowiki></code> || {{link|foo|wikt}} || <nowiki>https://en.wiktionary.org/wiki/</nowiki>'''foo''' |
||
− | |- |
||
− | | <code><nowiki>{{link|Foo|wikipedia}}</nowiki></code> || {{link|Foo|wikipedia}} || <nowiki>https://en.wikipedia.org/wiki/</nowiki>'''Foo''' |
||
− | |- |
||
− | | <code><nowiki>{{link|Foo}}</nowiki></code> || {{link|Foo}} || <nowiki>https://en.wikipedia.org/wiki/</nowiki>'''Foo''' |
||
− | |- |
||
− | | <code><nowiki>{{link}}</nowiki></code> || {{link}} || <nowiki>https://en.wikipedia.org/wiki/</nowiki>'''Article''' |
||
− | |} |
||
− | |||
− | {| class="wikitable" |
||
− | |+ The first parameter is <code style="font-family: monospace;>Foo</code> |
||
− | |- |
||
− | ! prefix !! result !! the link points to |
||
− | |- |
||
− | | acronym || {{link|Foo|acronym}} || <nowiki>https://www.acronymfinder.com/~/search/af.aspx?string=exact&Acronym=</nowiki>'''Foo''' |
||
− | |- |
||
− | | advogato || {{link|Foo|advogato}} || <nowiki>http://www.advogato.org/</nowiki>'''Foo''' |
||
− | |- |
||
− | | arxiv || {{link|Foo|arxiv}} || <nowiki>https://www.arxiv.org/abs/</nowiki>'''Foo''' |
||
− | |- |
||
− | | c2find || {{link|Foo|c2find}} || <nowiki>http://c2.com/cgi/wiki?FindPage&value=</nowiki>'''Foo''' |
||
− | |- |
||
− | | cache || {{link|Foo|cache}} || <nowiki>https://www.google.com/search?q=cache:</nowiki>'''Foo''' |
||
− | |- |
||
− | | commons || {{link|Foo|commons}} || <nowiki>https://commons.wikimedia.org/wiki/</nowiki>'''Foo''' |
||
− | |- |
||
− | | dictionary || {{link|Foo|dictionary}} || <nowiki>http://www.dict.org/bin/Dict?Database=*&Form=Dict1&Strategy=*&Query=</nowiki>'''Foo''' |
||
− | |- |
||
− | | doi || {{link|Foo|doi}} || <nowiki>https://dx.doi.org/</nowiki>'''Foo''' |
||
− | |- |
||
− | | drumcorpswiki || {{link|Foo|drumcorpswiki}} || <nowiki>http://www.drumcorpswiki.com/</nowiki>'''Foo''' |
||
− | |- |
||
− | | dwjwiki || {{link|Foo|dwjwiki}} || <nowiki>http://www.suberic.net/cgi-bin/dwj/wiki.cgi?</nowiki>'''Foo''' |
||
− | |- |
||
− | | elibre || {{link|Foo|elibre}} || <nowiki>http://enciclopedia.us.es/index.php/</nowiki>'''Foo''' |
||
− | |- |
||
− | | emacswiki || {{link|Foo|emacswiki}} || <nowiki>https://www.emacswiki.org/cgi-bin/wiki.pl?</nowiki>'''Foo''' |
||
− | |- |
||
− | | foldoc || {{link|Foo|foldoc}} || <nowiki>https://foldoc.org/?</nowiki>'''Foo''' |
||
− | |- |
||
− | | foxwiki || {{link|Foo|foxwiki}} || <nowiki>https://fox.wikis.com/wc.dll?Wiki~</nowiki>'''Foo''' |
||
− | |- |
||
− | | google || {{link|Foo|google}} || <nowiki>https://www.google.com/search?q=</nowiki>'''Foo''' |
||
− | |- |
||
− | | googlegroups || {{link|Foo|googlegroups}} || <nowiki>https://groups.google.com/groups?q=</nowiki>'''Foo''' |
||
− | |- |
||
− | | hammondwiki || {{link|Foo|hammondwiki}} || <nowiki>http://www.dairiki.org/HammondWiki/</nowiki>'''Foo''' |
||
− | |- |
||
− | | hrwiki || {{link|Foo|hrwiki}} || <nowiki>http://www.hrwiki.org/wiki/</nowiki>'''Foo''' |
||
− | |- |
||
− | | linuxwiki || {{link|Foo|linuxwiki}} || <nowiki>http://linuxwiki.de/</nowiki>'''Foo''' |
||
− | |- |
||
− | | lojban || {{link|Foo|lojban}} || <nowiki>https://mw.lojban.org/papri/</nowiki>'''Foo''' |
||
− | |- |
||
− | | lqwiki || {{link|Foo|lqwiki}} || <nowiki>http://wiki.linuxquestions.org/wiki/</nowiki>'''Foo''' |
||
− | |- |
||
− | | meatball || {{link|Foo|meatball}} || <nowiki>http://www.usemod.com/cgi-bin/mb.pl?</nowiki>'''Foo''' |
||
− | |- |
||
− | | mw || {{link|Foo|mw}} || <nowiki>https://www.mediawiki.org/wiki/</nowiki>'''Foo''' |
||
− | |- |
||
− | | metawikimedia || {{link|Foo|metawikimedia}} || <nowiki>https://meta.wikimedia.org/wiki/</nowiki>'''Foo''' |
||
− | |- |
||
− | | mozillawiki || {{link|Foo|mozillawiki}} || <nowiki>https://wiki.mozilla.org/</nowiki>'''Foo''' |
||
− | |- |
||
− | | mediawikiwiki || {{link|Foo|mediawikiwiki}} || <nowiki>https://www.mediawiki.org/wiki/</nowiki>'''Foo''' |
||
− | |- |
||
− | | oeis || {{link|Foo|oeis}} || <nowiki>https://oeis.org/</nowiki>'''Foo''' |
||
− | |- |
||
− | | pmid || {{link|Foo|pmid}} || <nowiki>https://www.ncbi.nlm.nih.gov/pubmed/</nowiki>'''Foo'''?dopt=Abstract |
||
− | |- |
||
− | | pythoninfo || {{link|Foo|pythoninfo}} || <nowiki>https://wiki.python.org/moin/</nowiki>'''Foo''' |
||
− | |- |
||
− | | rfc || {{link|Foo|rfc}} || <nowiki>https://tools.ietf.org/html/rfc</nowiki>'''Foo''' |
||
− | |- |
||
− | | s23wiki || {{link|Foo|s23wiki}} || <nowiki>http://s23.org/wiki/</nowiki>'''Foo''' |
||
− | |- |
||
− | | senseislibrary || {{link|Foo|senseislibrary}} || <nowiki>https://senseis.xmp.net/?</nowiki>'''Foo''' |
||
− | |- |
||
− | | squeak || {{link|Foo|squeak}} || <nowiki>http://wiki.squeak.org/squeak/</nowiki>'''Foo''' |
||
− | |- |
||
− | | theopedia || {{link|Foo|theopedia}} || <nowiki>https://www.theopedia.com/</nowiki>'''Foo''' |
||
− | |- |
||
− | | tmbw || {{link|Foo|tmbw}} || <nowiki>http://www.tmbw.net/wiki/</nowiki>'''Foo''' |
||
− | |- |
||
− | | tmnet || {{link|Foo|tmnet}} || <nowiki>http://www.technomanifestos.net/?</nowiki>'''Foo''' |
||
− | |- |
||
− | | twiki || {{link|Foo|twiki}} || <nowiki>http://twiki.org/cgi-bin/view/</nowiki>'''Foo''' |
||
− | |- |
||
− | | uncyclopedia || {{link|Foo|uncyclopedia}} || <nowiki>https://en.uncyclopedia.co/wiki/</nowiki>'''Foo''' |
||
− | |- |
||
− | | unreal || {{link|Foo|unreal}} || <nowiki>https://wiki.beyondunreal.com/</nowiki>'''Foo''' |
||
− | |- |
||
− | | usemod || {{link|Foo|usemod}} || <nowiki>http://www.usemod.com/cgi-bin/wiki.pl?</nowiki>'''Foo''' |
||
− | |- |
||
− | | wikia || {{link|Foo|wikia}} || <nowiki>http://www.wikia.com/wiki/</nowiki>'''Foo''' |
||
− | |- |
||
− | | wikibooks || {{link|Foo|wikibooks}} || <nowiki>https://en.wikibooks.org/wiki/</nowiki>'''Foo''' |
||
− | |- |
||
− | | wikidata || {{link|Foo|wikidata}} || <nowiki>https://www.wikidata.org/wiki/</nowiki>'''Foo''' |
||
− | |- |
||
− | | wikif1 || {{link|Foo|wikif1}} || <nowiki>http://www.wikif1.org/</nowiki>'''Foo''' |
||
− | |- |
||
− | | wikihow || {{link|Foo|wikihow}} || <nowiki>https://www.wikihow.com/</nowiki>'''Foo''' |
||
− | |- |
||
− | | wikimedia || {{link|Foo|wikimedia}} || <nowiki>https://wikimediafoundation.org/wiki/</nowiki>'''Foo''' |
||
− | |- |
||
− | | wikinews || {{link|Foo|wikinews}} || <nowiki>https://en.wikinews.org/wiki/</nowiki>'''Foo''' |
||
− | |- |
||
− | | wikinfo || {{link|Foo|wikinfo}} || <nowiki>http://wikinfo.co/English/index.php/</nowiki>'''Foo''' |
||
− | |- |
||
− | | wikipedia || {{link|Foo|wikipedia}} || <nowiki>https://en.wikipedia.org/wiki/</nowiki>'''Foo''' |
||
− | |- |
||
− | | wikiquote || {{link|Foo|wikiquote}} || <nowiki>https://en.wikiquote.org/wiki/</nowiki>'''Foo''' |
||
− | |- |
||
− | | wikisource || {{link|Foo|wikisource}} || <nowiki>https://wikisource.org/wiki/</nowiki>'''Foo''' |
||
− | |- |
||
− | | wikispecies || {{link|Foo|wikispecies}} || <nowiki>https://species.wikimedia.org/wiki/</nowiki>'''Foo''' |
||
− | |- |
||
− | | wikiversity || {{link|Foo|wikiversity}} || <nowiki>https://en.wikiversity.org/wiki/</nowiki>'''Foo''' |
||
− | |- |
||
− | | wikivoyage || {{link|Foo|wikivoyage}} || <nowiki>https://en.wikivoyage.org/wiki/</nowiki>'''Foo''' |
||
− | |- |
||
− | | wiktionary || {{link|Foo|wiktionary}} || <nowiki>https://en.wiktionary.org/wiki/</nowiki>'''Foo''' |
||
− | |- |
||
− | | wikt || {{link|Foo|wikt}} || <nowiki>https://en.wiktionary.org/wiki/</nowiki>'''Foo''' |
||
− | |} |
||
− | |||
− | == Notes == |
||
− | * Do not try to use this template with second parameter but with an empty first one: <s><code><nowiki>{{link||wikiquote}}</nowiki></code></s>. It would not work! |
||
− | * If you want to display on the page another word then the one used in the link, just write a wiki-link without this template: <code><nowiki>[[wikipedia:Foo|bar]]</nowiki></code> (result: [[wikipedia:Foo|bar]]). |
||
− | * If you want to create a link to non-English Wikipedia (or another wiki of the Wikimedia Foundation having many language sections), add its language code before the first parameter or after the second one, with a colon. |
||
− | : Examples: |
||
− | :{| class="wikitable" |
||
− | ! code !! result !! comment |
||
− | |- |
||
− | | <code><nowiki>{{link|de:Artikel}}</nowiki></code> || {{link|de:Artikel}} || The language code is displayed on the page. |
||
− | |- |
||
− | | <code><nowiki>{{link|Artikel|wikipedia:de}}</nowiki></code> || {{link|Artikel|wikipedia:de}} || The language code is '''not''' displayed on the page. |
||
− | |} |
||
− | : (The address ''<nowiki>https://en.wikipedia.org/wiki/de:Artikel</nowiki>'' redirects to ''<nowiki>https://de.wikipedia.org/wiki/Artikel</nowiki>''.) |
||
− | * The created link looks like an internal link. If you want the link to look as an external, just write an external link. |
||
− | : Compare: |
||
− | :{| class="wikitable" |
||
− | ! code !! result |
||
− | |- |
||
− | | <code><nowiki>{{link|Foo}}</nowiki></code> || {{link|Foo}} |
||
− | |- |
||
− | | <code><nowiki>[[wikipedia:Foo|Foo]]</nowiki></code> || [[wikipedia:Foo|Foo]] |
||
− | |- |
||
− | | <code><nowiki>[https://en.wikipedia.org/wiki/Foo Foo]</nowiki></code> || [https://en.wikipedia.org/wiki/Foo Foo] |
||
− | |}{{doc-end}} |
||
[[Category:Templates]] |
[[Category:Templates]] |
Revision as of 07:49, 8 November 2020
This template creates a link to a page on some site, whose address is hardcoded in the MediaWiki software.
Usage
The template accepts two unnamed parameters:
- Name of the article, default value: Article.
- Prefix (code name of the site), one of the listed in the second table (see below), default value: wikipedia.
code | result | the link points to |
---|---|---|
{{link|foo|wikt}} |
foo | https://en.wiktionary.org/wiki/foo |
{{link|Foo|wikipedia}} |
Foo | https://en.wikipedia.org/wiki/Foo |
{{link|Foo}} |
Foo | https://en.wikipedia.org/wiki/Foo |
{{link}} |
Article | https://en.wikipedia.org/wiki/Article |
prefix | result | the link points to |
---|---|---|
acronym | Foo | https://www.acronymfinder.com/~/search/af.aspx?string=exact&Acronym=Foo |
advogato | Foo | http://www.advogato.org/Foo |
arxiv | Foo | https://www.arxiv.org/abs/Foo |
c2find | Foo | http://c2.com/cgi/wiki?FindPage&value=Foo |
cache | Foo | https://www.google.com/search?q=cache:Foo |
commons | Foo | https://commons.wikimedia.org/wiki/Foo |
dictionary | Foo | http://www.dict.org/bin/Dict?Database=*&Form=Dict1&Strategy=*&Query=Foo |
doi | Foo | https://dx.doi.org/Foo |
drumcorpswiki | Foo | http://www.drumcorpswiki.com/Foo |
dwjwiki | Foo | http://www.suberic.net/cgi-bin/dwj/wiki.cgi?Foo |
elibre | Foo | http://enciclopedia.us.es/index.php/Foo |
emacswiki | Foo | https://www.emacswiki.org/cgi-bin/wiki.pl?Foo |
foldoc | Foo | https://foldoc.org/?Foo |
foxwiki | Foo | https://fox.wikis.com/wc.dll?Wiki~Foo |
Foo | https://www.google.com/search?q=Foo | |
googlegroups | Foo | https://groups.google.com/groups?q=Foo |
hammondwiki | Foo | http://www.dairiki.org/HammondWiki/Foo |
hrwiki | Foo | http://www.hrwiki.org/wiki/Foo |
linuxwiki | Foo | http://linuxwiki.de/Foo |
lojban | Foo | https://mw.lojban.org/papri/Foo |
lqwiki | Foo | http://wiki.linuxquestions.org/wiki/Foo |
meatball | Foo | http://www.usemod.com/cgi-bin/mb.pl?Foo |
mw | Foo | https://www.mediawiki.org/wiki/Foo |
metawikimedia | Foo | https://meta.wikimedia.org/wiki/Foo |
mozillawiki | Foo | https://wiki.mozilla.org/Foo |
mediawikiwiki | Foo | https://www.mediawiki.org/wiki/Foo |
oeis | Foo | https://oeis.org/Foo |
pmid | Foo | https://www.ncbi.nlm.nih.gov/pubmed/Foo?dopt=Abstract |
pythoninfo | Foo | https://wiki.python.org/moin/Foo |
rfc | Foo | https://tools.ietf.org/html/rfcFoo |
s23wiki | Foo | http://s23.org/wiki/Foo |
senseislibrary | Foo | https://senseis.xmp.net/?Foo |
squeak | Foo | http://wiki.squeak.org/squeak/Foo |
theopedia | Foo | https://www.theopedia.com/Foo |
tmbw | Foo | http://www.tmbw.net/wiki/Foo |
tmnet | Foo | http://www.technomanifestos.net/?Foo |
twiki | Foo | http://twiki.org/cgi-bin/view/Foo |
uncyclopedia | Foo | https://en.uncyclopedia.co/wiki/Foo |
unreal | Foo | https://wiki.beyondunreal.com/Foo |
usemod | Foo | http://www.usemod.com/cgi-bin/wiki.pl?Foo |
wikia | Foo | http://www.wikia.com/wiki/Foo |
wikibooks | Foo | https://en.wikibooks.org/wiki/Foo |
wikidata | Foo | https://www.wikidata.org/wiki/Foo |
wikif1 | Foo | http://www.wikif1.org/Foo |
wikihow | Foo | https://www.wikihow.com/Foo |
wikimedia | Foo | https://wikimediafoundation.org/wiki/Foo |
wikinews | Foo | https://en.wikinews.org/wiki/Foo |
wikinfo | Foo | http://wikinfo.co/English/index.php/Foo |
wikipedia | Foo | https://en.wikipedia.org/wiki/Foo |
wikiquote | Foo | https://en.wikiquote.org/wiki/Foo |
wikisource | Foo | https://wikisource.org/wiki/Foo |
wikispecies | Foo | https://species.wikimedia.org/wiki/Foo |
wikiversity | Foo | https://en.wikiversity.org/wiki/Foo |
wikivoyage | Foo | https://en.wikivoyage.org/wiki/Foo |
wiktionary | Foo | https://en.wiktionary.org/wiki/Foo |
wikt | Foo | https://en.wiktionary.org/wiki/Foo |
Notes
- Do not try to use this template with second parameter but with an empty first one:
. It would not work!{{link||wikiquote}}
- If you want to display on the page another word then the one used in the link, just write a wiki-link without this template:
[[wikipedia:Foo|bar]]
(result: bar). - If you want to create a link to non-English Wikipedia (or another wiki of the Wikimedia Foundation having many language sections), add its language code before the first parameter or after the second one, with a colon.
- Examples:
code result comment {{link|de:Artikel}}
de:Artikel The language code is displayed on the page. {{link|Artikel|wikipedia:de}}
Artikel The language code is not displayed on the page.
- (The address https://en.wikipedia.org/wiki/de:Artikel redirects to https://de.wikipedia.org/wiki/Artikel.)
- The created link looks like an internal link. If you want the link to look as an external, just write an external link.
- Compare:
Do not edit this template if you do not understand its code!