Template:Iwlink

From Terraria Wiki
Jump to navigation Jump to search
This template is i18n-ready, which means it is easy to localize for different languages. Please see I18n & l10n for templates to learn more.
Important.svg
CAUTION: Terraria Wiki code is complex!!!
If you want to use this code on another wiki, wiki.gg staff are not able to assist you.
Please consider picking a different wiki to adapt code from, or making your own templates!
Remember that content on a wiki is more important than fancy formatting.
Template-info.svg Documentation The documentation below is transcluded from Template:Iwlink/doc. (edit | history)

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

es-formal:Plantilla:Iwlink