Template:Iw

From Angelina Jordan Wiki
Revision as of 00:22, 28 August 2022 by Dcljr (talk | contribs) (+ class="noexcerpt")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Iw

Documentation

This template forms interwiki links and marks them in a special way (as seen above) to indicate that the reader will be leaving this wiki if they follow the link (similar to what is done automatically for external links). The most commonly needed interwiki links (for example, to Wikipedia) are implemented by more-specific templates listed below.

Template:Xl can be used to form similar links to external sites that are not wikis.

The name of this template is based on the word "interwiki".

This template is used on a great many pages. Making any changes to it will cause lots of jobs to be added to the processing queue.

The main rationale for using a template for external and interwiki links rather than MediaWiki's standard link syntax is to provide a single, standard indication that such links leave the wiki (interwiki links, like external links, are colored slightly lighter than internal wikilinks, but they do not have any trailing icon indicating the target is at another website). Also, since there is no easy way to find (normally formatted) interwiki links with, say, a search, using templates also makes it easier to find pages on which such links are used, via "What Links Here" for each template. (Although the latter benefit is slightly undercut by the fact that nearly every article here will have interwiki links on them!)

Usage

  • {{iw|prefix|target|linktext|site=|icon=|pre=|post=}}
  • {{iw|prefix= |target= |linktext= |site= |icon= |pre= |post=}}

The parameter prefix specifies the interwiki prefix used in the link. For a list of possible prefixes, see our interwiki map (the list is quite extensive and might be pared down quite a bit in the future to remove the less relevant ones). Note that some websites in the map are not actually wikis, so they might require their input (target) to be URL-encoded.

If no prefix is specified, wikipedia: is used (i.e., a link to Wikipedia is formed). If no target is specified, the current page title is used. If no linktext is specified, the target (or page title) is used.

See the examples for how the parameters site, icon, pre, and post might be used.

Examples

  • {{iw}}Iw
  • {{iw|wiktionary|legato}}legato
  • {{iw|wiktionary|legato|Legato}}Legato
  • {{iw|prefix=wiktionary|target=legato}}legato
  • {{iw|prefix=wikipedia|target=Willie Nelson|site=the English Wikipedia}}Willie Nelson
  • {{iw|prefix=wikipedia|target=no:Norske Talenter|linktext=Norske Talenter|pre=«|post=»|site=the Norwegian Wikipedia}} ⇒ «Norske Talenter»

The first example uses the current page title as both the target and the linktext. (The title of this page is Iw.)

To see the effect of the site parameter, hover on the "northeast-pointing arrow" after each link.

See also

Templates for interwiki linking (this one in bold):    [edit this list]

  • {{w}} – for linking to Wikipedia
  • {{mw}} – for linking to MediaWiki.org

These call the following:

  • {{iw}} – generates an interwiki link