No edit summary |
(fix SS links) |
||
(One intermediate revision by the same user not shown) | |||
Line 30: | Line 30: | ||
-->{{#if:{{#pos:{{{1}}}|Mod:Crystal Isles Dino Collection/}}|{{#vardefine:linktext|{{#sub:{{{1}}}|34}}}}{{#vardefine:dlc| [[File:Crystal Isles Dino Collection Icon.png|link=Mod:Crystal Isles Dino Collection]]}}{{#vardefine:filename|{{#replace:{{#var:filename}}|:|_}}}}}}<!-- |
-->{{#if:{{#pos:{{{1}}}|Mod:Crystal Isles Dino Collection/}}|{{#vardefine:linktext|{{#sub:{{{1}}}|34}}}}{{#vardefine:dlc| [[File:Crystal Isles Dino Collection Icon.png|link=Mod:Crystal Isles Dino Collection]]}}{{#vardefine:filename|{{#replace:{{#var:filename}}|:|_}}}}}}<!-- |
||
-->{{#if:{{#pos:{{{1}}}|Mod:Additional Creatures: Grand Hunt/}}|{{#vardefine:linktext|{{#sub:{{{1}}}|37}}}}{{#vardefine:dlc| [[File:Additional Creatures Grand Hunt Icon.png|link=Mod:Additional Creatures: Grand Hunt]]}}{{#vardefine:filename|{{#replace:{{#var:filename}}|:|_}}}}}}<!-- |
-->{{#if:{{#pos:{{{1}}}|Mod:Additional Creatures: Grand Hunt/}}|{{#vardefine:linktext|{{#sub:{{{1}}}|37}}}}{{#vardefine:dlc| [[File:Additional Creatures Grand Hunt Icon.png|link=Mod:Additional Creatures: Grand Hunt]]}}{{#vardefine:filename|{{#replace:{{#var:filename}}|:|_}}}}}}<!-- |
||
− | -->{{#if:{{#pos:{{{1}}}|Mod:Super Structures/}}|{{#vardefine:linktext|{{#sub:{{{1}}}| |
+ | -->{{#if:{{#pos:{{{1}}}|Mod:Super Structures/}}|{{#vardefine:linktext|{{#sub:{{{1}}}|21}}}}{{#vardefine:dlc| [[File:Mod Super Structures icon.png|link=Mod:Super Structures]]}}{{#vardefine:filename|{{#replace:{{#var:filename}}|:|_}}}}}}<!-- |
-->}}<!-- |
-->}}<!-- |
||
-->{{#if:{{{quantity|}}}| {{{quantity}}} × }}<!-- |
-->{{#if:{{{quantity|}}}| {{{quantity}}} × }}<!-- |
Revision as of 16:21, 26 August 2020
Link to an item page with an item image in front: Stone
Also supports an optional quantity in front: 5 × Stone
Usage
{{ItemLink|Stone}}
Name | Type | Required | Default |
---|---|---|---|
0
|
string
|
true
|
|
text
|
string
|
false
|
The value of the first positional parameter, or the second if given |
link
|
string
|
false
|
The value of the first positional parameter |
image
|
string
|
false
|
The value of the first positional parameter suffixed with .png
|
size
|
string
|
false
|
20px |
quantity
|
string
|
false
|
|
noDlcIcon
|
bool
|
false
|
|
mod
|
string
|
false
|
Examples
Both lines produce the same output:
{{ItemLink|Stone}}
= Stone
{{ItemLink|Stone|text=Stone|link=Stone|image=Stone.png|size=20px|quantity=}}
= Stone
Lowercase link:
{{ItemLink|Stone|text=stone}}
= stone
{{ItemLink|Stone|stone}}
= stone
Plural link:
{{ItemLink|Stone|text=Stones}}
= Stones
Alternative: {{ItemLink|Stone}}s
= Stones
Quantity:
{{ItemLink|Stone|quantity=5}}
= 5 × Stone
{{ItemLink|Stone|quantity=5-10}}
= 5-10 × Stone
DLC-suffices are converted automatically to the according icon, if no explicit link-text is given
{{ItemLink|Sand (Scorched Earth)}}
= Sand
{{ItemLink|Sand (Scorched Earth)|Sand}}
= Sand
Mods that are supported will have the mod-part replaced with their icon
{{ItemLink|Mod:Ark Eternal/Alpha Meat}}
= Alpha Meat
The parameter noDlcIcon hides the extra DLC-/mod-icon
{{ItemLink|Sand (Scorched Earth)|noDlcIcon=1}}
= Sand
Mod and DLC suffices are defined and managed within Module:DissectDlcItemName.