Template:MP link: Difference between revisions
imported>Dawning No edit summary |
the mass documenting |
||
| (8 intermediate revisions by one other user not shown) | |||
| Line 1: | Line 1: | ||
<includeonly>{{#if:{{{image|}}}|[[File:{{{image|}}}|{{{size|42px}}}|link={{{link|{{{1|}}}}}}|class=responsive-image]] | <includeonly>{{#if:{{{image|}}}|[[File:{{{image|}}}|{{{size|42px}}}|link={{{link|{{{1|}}}}}}|class=responsive-image]]}}{{#if:{{#pos:{{{link|}}}|http}}|[{{{link|}}}{{{1|}}}]|[[{{{link|{{{1|}}}}}}|{{{1|}}}]]}}</includeonly><noinclude> | ||
{{ | {{Documentation}} | ||
</noinclude> | </noinclude> | ||
Latest revision as of 11:55, 20 June 2026
MP link makes a single link (to a wiki page or an external URL) with an optional icon placed in front of the link text.
Overview
This template builds one link with an optional image to its left. If you give it a wiki page name it makes an internal link; if you give it a full http URL it makes an external link instead. The optional icon links to the same target. It is used on hub pages like Biomes, Classes, Companions and Loot to show an image + label that both jump to the linked page.
Parameters
| Parameter | Required? | What it does | Example |
|---|---|---|---|
1 (first unnamed) |
Required | The visible link text. Also used as the link target when link= is not given. |
Beach
|
link |
Optional | Where the link points. May be a wiki page title or a full http(s):// URL. If omitted, the target falls back to parameter 1. |
Special:Random
|
image |
Optional | File name (with extension) of an icon shown before the text. Omit for a text-only link. | BiomeSprite-Beach.png
|
size |
Optional | Icon display size. Defaults to 42px. |
92px
|
How to use
1. Put the label as the first value right after the template name: Beach. With nothing else, this both shows "Beach" and links to the page Beach.
2. To point somewhere different from the label, add link=. Example: Things shows "Things" but jumps to a random page.
3. link= understands external links automatically: if the value contains http, it renders as an external link; otherwise it is treated as a wiki page title.
4. To add an icon, set image= to a file name including its extension. The icon appears before the text and links to the same target. Adjust its size with size= (default 42px).
Copy this
{{MP link|
|link=
|image=
|size=
}}Example
{{MP link|Beach|image=BiomeSprite-Beach.png|size=92px}}Tips & notes
- The first unnamed parameter is doing double duty: it is both the displayed text AND the default link target. If they should differ, supply
link=. imageneeds the file extension (e.g.BiomeSprite-Beach.png) — the template does not add.png.- The image and the text are two separate links to the same destination; both are clickable.
- For an external destination, just paste the full URL into
link=(it must containhttpto be detected as external). - The naming convention for biome icons on this wiki is
BiomeSprite-<Name>.png(e.g.BiomeSprite-CrimsonForest.png).