Difference between revisions of "Template:Wikipedia"

From Second Life Wiki
Jump to navigation Jump to search
(Shamelessly copied from wiki.openstreetmap.org; our earlier version was way too basic for my taste.)
(The "on Wikipedia" trailing words became an alt to the Wikipedia icon (too confusing otherwise))
Line 25: Line 25:
}}{{#ifeq:{{{text|}}}|no
}}{{#ifeq:{{{text|}}}|no
| <!--empty-->
| <!--empty-->
| {{LangSwitch|lang={{#if:{{{lang|}}}|{{{lang|}}}|{{Langcode}}}}
| &thinsp;[[File:Wikipedia-16px.png|16px|alt={{LangSwitch|lang={{#if:{{{lang|}}}|{{{lang|}}}|{{Langcode}}}}
   | ar = &#32;على ويكيبيديا
   | ar = &#32;على ويكيبيديا
   | az = &#32;məqalə Vikipediya
   | az = &#32;məqalə Vikipediya
Line 73: Line 73:
   | zh-hans = 于维基百科
   | zh-hans = 于维基百科
   | zh-hant = 於維基百科
   | zh-hant = 於維基百科
   }}
   }}]]
}}<noinclude>{{Documentation}}</noinclude>
}}<noinclude>{{Documentation}}</noinclude>

Revision as of 08:56, 14 September 2022

optional labelon Wikipedia

[Edit] [🔄Purge] Template-info.png Template documentation

exclamation mark

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]

This template is useful to simply create a link to Wikipedia.

Usage

  • 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 to no, 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 Lifeon 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)