FANDOM


0

Export this template, then import, to install it.
Use edit summary: Copied from [[w:c:templates:Template:If interwiki]] to properly attribute this template's editors.
This template is probably not already on your wiki.
Template documentation
Note: the template above may sometimes be partially or fully invisible.

View or edit this documentation. (How does this work?)

Editors can experiment with this template's sandbox and test case pages.
Purpose

Test if parameter 1 passed is an interwiki linkname

Uses

This may be used to

  • restrict links to only interwiki links
  • restrict links to only local links
  • format interwiki and local links differently
Syntax

{{if interwiki| linkname | what to print if yes | what to print if no }}

  • Parameter 1 (MANDATORY) – linkname to test if this is an interwiki link
  • Parameter 2 (OPTIONAL) – If true, enter a statement to output (default: "1" )
  • Parameter 3 (OPTIONAL) – If false, enter a statement to output (default: "0" )
Notes

This does not test if the page the link links to exists or not

Examples

{{If interwiki|Main Page|yes|no}} → no

{{If interwiki|Template:If interwiki link}} → 0

{{If interwiki|xakljdfasjflads:akjfdljasdflasjf|true|false}} → false

{{If interwiki|w:c:dev:Main Page|Y|N}} → N

{{If interwiki|fr:xakljdfasjflads:akjfdljasdflasjf|T|F}} → F

{{If interwiki|wikt:en:File:Main Page|Affirmative|Negative}} → Affirmative

{{If interwiki|w:Main Page|yes|no}} → yes

See also
Community content is available under CC-BY-SA unless otherwise noted.