Template:Iw/doc

From Angelina Jordan Wiki
Revision as of 12:07, 9 August 2022 by Dcljr (talk | contribs) (+ {high-usage-template warning})
This is a subpage documenting Template:Iw. To change the template, edit that page; to change the template's documentation (seen below), edit this one.

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.

The name of the 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.

Usage

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

For a list of possible prefixes, see our interwiki map. Note that some websites in the map are not actually wikis, so they might require their input (target) to be URL-encoded.

Examples

  • {{iw}}Iw/doc
  • {{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»

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

Benefits

The main benefits of using templates based on this one for interwiki linking are:

  1. It can save a little typing/space in the simplest cases (compare: [[wikipedia:Norway|Norway]] vs. {{w|Norway}}).
  2. It makes it easier to find pages on which such links are used, via "What Links Here" for each template (there is, unfortunately, no way to find interwiki links with a regular search).
  3. It provides a more obvious indication that such links leave the wiki (like external links, interwiki links are colored slightly lighter than internal wikilinks, but they do not have any trailing icon indicating the target is at another website).

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