Difference between revisions of "Template:Wikipedia"
Jump to navigation
Jump to search
(FULLPAGENAMEE is available in mediawiki 1.15) |
(Shamelessly copied from wiki.openstreetmap.org; our earlier version was way too basic for my taste.) |
||
Line 1: | Line 1: | ||
[ | {{#ifeq:{{{link|}}}|no | ||
| {{#ifeq:{{{icon|}}}|no | |||
| <!--empty--> | |||
| <span style="white-space:nowrap"><!--prevent line wrap between the icon and the link text-->{{#ifeq:{{{text|}}}|no | |||
| <span style="padding:0 1px">[[File:Wikipedia-16px.png|alt=|link=|w:{{#if:{{{1|}}}|{{{1|}}}:}} {{{2<noinclude>|Article</noinclude>}}}]]</span> | |||
| <!--empty--> | |||
}} | |||
}}<span style="white-space:normal"><!--allow line wraps between words of the link text, if needed--><bdi>{{#if:{{{3|<noinclude>optional label</noinclude>}}} | |||
| {{{3|<noinclude>optional label</noinclude>}}} | |||
| {{#ifeq:{{{text|}}}|no | |||
| {{#ifeq:{{{icon|}}}|no | |||
| w:{{#if:{{{1|}}}|{{{1|}}}:}} | |||
}} | |||
}}{{{2<noinclude>|Article</noinclude>}}}}}</bdi></span></span> | |||
| <span class="plainlinks" title="w:{{#if:{{{1|}}}|{{{1|}}}:}}{{{2<noinclude>|Article</noinclude>}}}">[{{FULLURL:w:{{#if:{{{1|}}}|{{{1|}}}:}}{{{2<noinclude>|Article</noinclude>}}}}} {{#ifeq:{{{icon|}}}|no | |||
| <!--empty--> | |||
| <span style="white-space:nowrap"><!--prevent line wrap between the icon and the link text-->{{#ifeq:{{{text|}}}|no | |||
| <span style="padding:0 1px">[[File:Wikipedia-16px.png|alt=|link=|w:{{#if:{{{1|}}}|{{{1|}}}:}}{{{2<noinclude>|Article</noinclude>}}}]]</span> | |||
| <!--empty--> | |||
}} | |||
}}<span style="white-space:normal"><!--allow line wraps between words of the link text, if needed--><bdi>{{#if:{{{3|<noinclude>optional label</noinclude>}}} | |||
| {{{3|<noinclude>optional label</noinclude>}}} | |||
| {{{2<noinclude>|Article</noinclude>}}} | |||
}}</bdi></span></span>]</span> | |||
}}{{#ifeq:{{{text|}}}|no | |||
| <!--empty--> | |||
| {{LangSwitch|lang={{#if:{{{lang|}}}|{{{lang|}}}|{{Langcode}}}} | |||
| ar =  على ويكيبيديا | |||
| az =  məqalə Vikipediya | |||
| bg =  в Уикипедия | |||
| bn =  উইকিপিডিয়ায় | |||
| br =  ar Wikipedia | |||
| bs =  na Wikipediji | |||
| ca =  a la Viquipèdia | |||
| co =  supra Wikipedia | |||
| cs =  na Wikipedii | |||
| de =  auf Wikipedia | |||
| ee =  kohta Wikipedia | |||
| el =  στη Βικιπαίδεια | |||
| en =  on Wikipedia | |||
| eo =  ĉe Vikipedio | |||
| es =  en la Wikipedia | |||
| eu =  Wikipedian | |||
| fa =  در ویکیپدیا | |||
| fi =  Wikipediassa | |||
| fr =  sur Wikipédia | |||
| he =  בוויקיפדיה | |||
| hi =  विकिपीडिया पर | |||
| hr =  na Wikipediji | |||
| hu =  a Wikipédiában | |||
| hy =  Վիքիփեդիայում | |||
| it =  su Wikipedia | |||
| ja = (Wikipedia) | |||
| ka =  ვიკიპედია | |||
| km =  លើវិគីភីឌា | |||
| ko = (위키백과) | |||
| lo =  ກ່ຽວກັບວິກິພີເດຍ | |||
| mk =  на Википедија | |||
| nl =  op Wikipedia | |||
| no =  på Wikipedia | |||
| pl =  w Wikipedii | |||
| pt =  na Wikipédia | |||
| ru =  в Википедии | |||
| sl =  na Wikipediji | |||
| sq =  në Wikipedia | |||
| sr =  на Википедиа | |||
| tr =  Vikipedi’de | |||
| tl =  sa Wikipedia | |||
| th =  วิกิพีเดีย | |||
| uk =  у Вікіпедії | |||
| ur =  وکی پیڈیا پر | |||
| yue = 喺維基百科 | |||
| zh-hans = 于维基百科 | |||
| zh-hant = 於維基百科 | |||
}} | |||
}}<noinclude>{{Documentation}}</noinclude> |
Revision as of 01:25, 14 September 2022
optional label on Wikipedia
This documentation is transcluded on Wikipedia from Template:Wikipedia/doc. (Edit | history)
Note to editors: Please don't categorize this template by editing it directly. Instead, place the category in its documentation page, in its "includeonly" section.
Note to editors: Please don't categorize this template by editing it directly. Instead, place the category in its documentation page, in its "includeonly" section.
Note: This template is used on a lot of pages. In order not to put too much load on the servers, edits should be kept to a bare minimum.
Please discuss proposed changes on the talk page first.
Editing a template causes all pages that use the template to be re-rendered. If the Template is used often, this can put a lot of load on the servers since it fills up the job queue. [statistics]
Please discuss proposed changes on the talk page first.
Editing a template causes all pages that use the template to be re-rendered. If the Template is used often, this can put a lot of load on the servers since it fills up the job queue. [statistics]
This template is useful to simply create a 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 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.
- Second parameter: the text to display with the link. If unset, the template displays the title of the page (first parameter).
There are also three named parameters which define whether some parts of the link are shown:
lang
: language for the destination page (default: current language)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.
Examples
{{Markup2|m={{Wikipedia|Second Life|Second Life}}|r=Second Life on Wikipedia |m1={{Wikipedia|lang=it|OpenStreetMap|OSM}}|r1=[{{FULLURL:w:OpenStreetMap:OSM} }} OSM}] su Wikipedia
See also
- The other, similar Template:WikiIcon, by default, does exactly what it says: draws an icon.
- Template:Wiki does approximately the same thing as this template (may be merged in the future)