Template:IconLink

From Ephinea PSO Wiki
Revision as of 23:43, 13 August 2023 by Ryan (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

[[File:{{{1}}}.png|16px|middle|link=]][[|]]

Usage

This template accepts up to 4 numbered parameters and an additional nolink parameter.

The first parameter is the icon the link will be rendered with; for example, {{IconLink|sword}} will generate a link with a Sword icon.png icon in front of it. This parameter must match with an image name – for example, {{IconLink|booma}} matches Booma.png – or the link won't render properly. This template was made to be used with the specific icon images on this wiki – for example, {{IconLink|gun}} will automatically use Gun icon.png – however, any image is technically usable, and will be resized to a 16-pixel-wide image.

The second parameter may be a color, but this is optional. Supported colors are link, normal, white, attributes, green, untekked, cyan, blue, rare, yellow, es, red, native, abeast, ab, machine, dark, olga2, and glow.

If a different value or no value is specified, it will automatically use the link color, and the second parameter will instead become the page that the link points to. This is useful for quickly rendering a link that doesn't need a particular text color, like for a technique; for example, a Handgun has an icon but no specific in-game text color, so using {{IconLink|gun|Handgun}} will quickly render a Gun icon.pngHandgun link. However, all items already have easier-to-use templates; see Category:Link templates for more information.

If a color was specified, the third parameter is the page that the link points to; for example, {{IconLink|cane|attributes|Baton}} becomes Cane icon.pngBaton. If a color was not specified, the third parameter is the text of the link; {{IconLink|gun|Handgun|Bind Handgun}} renders as Gun icon.pngBind Handgun.

The fourth parameter is optional, and only necessary if a color was specified. If this is the case, then the fourth parameter is the text of the link; {{IconLink|sword|untekked|Gladius|Demon's Gladius}} will render as Sword icon.pngDemon's Gladius.

This template automatically changes itself from a link to simple bold text if the link points to the page the link is on; MediaWiki does this automatically with standalone links, but not image links, such as the icons that precede the text in this template.

Examples

{{IconLink|sword|Saber}}

Sword icon.pngSaber

{{IconLink|gun|attributes|Launcher|Charge Launcher +15}}

Gun icon.pngCharge Launcher +15

{{IconLink|unit|rare|V101}}

Unit icon.pngV101

{{IconLink|cane|es|ES Windmill}}

Cane icon.pngES Windmill