Difference between revisions of "Template:Wikipedia/doc"
Jump to navigation
Jump to search
(Shamelessly copied from wiki.openstreetmap.org) |
(→Usage: Added warning that the rendering of "on Wikipedia" was slightly changed) |
||
Line 4: | Line 4: | ||
=== Usage === | === Usage === | ||
{{Ambox|type=notice|text=This template is in flux; currently, a small Wikipedia icon is always shown to explain that the link is ''external'' to the SL Wiki. This might change in the future}} | |||
* First parameter (mandatory): the Wikipedia linguistic edition code; | * First parameter (mandatory): the Wikipedia linguistic edition code; | ||
*: it is the <var style="color:#080">xx</var> in URL "<nowiki>//</nowiki><var style="color:#080">xx</var>.wikipedia.org/wiki/<var style="color:#080">Pagename</var>", or any other '''interwiki code''' recognized by English Wikipedia); | *: it is the <var style="color:#080">xx</var> in URL "<nowiki>//</nowiki><var style="color:#080">xx</var>.wikipedia.org/wiki/<var style="color:#080">Pagename</var>", or any other '''interwiki code''' recognized by English Wikipedia); |
Revision as of 09:01, 14 September 2022
This is a documentation subpage for Template:Wikipedia. It contains usage information, categories and other content or metadata that is not part of the original template. |
This template is useful to simply create link to Wikipedia.
Usage
This template is in flux; currently, a small Wikipedia icon is always shown to explain that the link is external to the SL Wiki. This might change in the future |
- First parameter (mandatory): the Wikipedia linguistic edition code;
- it is the xx in URL "//xx.wikipedia.org/wiki/Pagename", or any other interwiki code recognized by English Wikipedia);
- When this required parameter is empty, it emplies the English Wikipedia edition (so the empty value is equivalent to the
en
value).
- Second parameter: the actual pagename on Wikipedia (or in the target wiki of the interwiki code specified in the first parameter)
- it is the Pagename in URL "//xx.wikipedia.org/wiki/Pagename");
- note however that this parameter should not be URL-encoded (with overlong
%NN%NN
sequences) but should readable (in native UTF-8), also preferably with spaces rather than underscores between words.
- Third parameter: the text to display with the link. If unset, the template displays the title of the page (second parameter).
There are also three named parameters which define whether some parts of the link are shown:
icon
: if set tono
, the template doesn't display the Wikipedia icon;- any other value (or if the parameter is not specified) will display this icon.
link
: if set tono
, the template doesn't display an active link to the Wikipedia article (the link may still be visible when hovering the icon, if there's one);- any other value (or if the parameter is not specified) will display the active link.
text
: if set tono
, the template doesn't display the sentence "on Wikipedia" (which is translated according to the language of the current page on this wiki, but not the language of the target Wikipedia);- any other value (or if the parameter is not specified) will display the extra text.
Examples
- {{Wikipedia|it|OpenStreetMap}} ==> OpenStreetMap
- {{Wikipedia|eo|OpenStreetMap|Nia projekto}} ==> OpenStreetMap
- {{Wikipedia|de|OpenStreetMap|text=no}} ==> OpenStreetMap
- {{Wikipedia|es|OpenStreetMap|icon=no}} ==> OpenStreetMap
- {{Wikipedia|es|OpenStreetMap|icon=yes}} ==> OpenStreetMap
- {{Wikipedia|es|OpenStreetMap|icon=yes|text=no}} ==> OpenStreetMap
- {{Wikipedia|es|OpenStreetMap|text=no}} ==> OpenStreetMap
- {{Wikipedia|es|OpenStreetMap}} ==> OpenStreetMap
- {{Wikipedia|fr|OpenStreetMap|link=no}} ==> OpenStreetMap
- {{Wikipedia|fi|OpenStreetMap|Me|text=no}} ==> OpenStreetMap
- {{Wikipedia|pt|OpenStreetMap|text=no|link=no}} ==> OpenStreetMap
- {{Wikipedia|fi|icon=no|text=no|Me}} ==> Me
- {{Wikipedia|fi|link=no|icon=no|text=no|Me}} ==> Me
- {{Wikipedia|fi|link=no|icon=no|Me}} ==> Me
- {{Wikipedia|ru|OpenStreetMap}} ==> OpenStreetMap
- {{Wikipedia|az|OpenStreetMap}} ==> OpenStreetMap
- {{Wikipedia|cs|OpenStreetMap}} ==> OpenStreetMap
- {{Wikipedia|commons|Category:OpenStreetMap|text=no}} ==> Category:OpenStreetMap
See also
- The other, similar Template:WikiIcon does not add extra text ("on Wikipedia"). Also by default it does exactly what it says in the title: draws an icon.
- Template:Wiki
- Instead, you could also just use a direct wiki link:
[[wikipedia:xx:pagename|display text]]
(xx
being the language code; "|display text
" is optional).