Template:Iwlink
This template is a shortcut for interwiki links.
It also serves as a shortcut for links to pages in different namespaces. The alias {{nslink}} should be used for clarity in that case.
Usage
Interwiki links
{{ iwlink | <interwiki prefix> | <link target> | <display text> | t = <custom display text> }}
- First unnamed parameter
Prefix code of the target wiki. See Special:Interwiki for a list of all available prefixes.
- Second unnamed parameter
Title of the page on the target wiki.
- Third unnamed parameter
Display text of the link. This is processed by {{displaytext}}, which includes automatic translation and plural handling.
- t
Completely custom display text. This overrides the processing of {{displaytext}} which might be undesired in some cases.
Namespace links
{{ nslink | <namespace> | <link target without namespace> | <display text> | t = <custom display text> }}
- First unnamed parameter
Namespace of the target page. See Special:NamespaceInfo for a list of all available namespaces. A colon must be prepended to the Category: and File: namespaces.
- Second unnamed parameter
Title of the target page without namespace.
- Third unnamed parameter
Display text of the link. This is processed by {{displaytext}}, which includes automatic translation and plural handling.
- t
Completely custom display text. This overrides the processing of {{displaytext}} which might be undesired in some cases.
Notes
{{iwlink|<prefix/namespace>|<target>}}is equivalent to[[<prefix/namespace>:<target>|{{tr|<target>}}]].{{iwlink|<prefix/namespace>|<target>|<display>}}is equivalent to[[<prefix/namespace>:<target>|{{displaytext|<target>|<display>}}]].{{iwlink|<prefix/namespace>|<target>|t=<display>}}is equivalent to[[<prefix/namespace>:<target>|<display>]].
Examples
Interwiki links
| Code | Result |
|---|---|
{{iwlink|dts|Hunger}} |
Hunger |
{{iwlink|dts|Hunger|debuff}} |
debuff |
{{iwlink|dts|Campfire|s}}(plural handling by {{displaytext}}) |
Campfires |
{{iwlink|dts|Campfire|t=s}} |
s |
{{iwlink|dts|t=Don't Starve Wiki}} |
Don't Starve Wiki |
Namespace links
| Code | Result |
|---|---|
{{nslink|Template|Help}} |
Help |
{{nslink|Guide|Class setups|classes}} |
classes |
{{nslink|:Category|Consumable items}} |
Consumable items |