Difference between revisions of "Template:ItemLink/doc"

From ARK: Survival Evolved Wiki
Jump to: navigation, search
(renamed the parameter noIcon to the more descriptive noDlcIcon)
(added example for mod-item)
 
Line 74: Line 74:
 
<code><nowiki>{{ItemLink|Sand (Scorched Earth)}}</nowiki></code> = {{ItemLink|Sand (Scorched Earth)}}<br>
 
<code><nowiki>{{ItemLink|Sand (Scorched Earth)}}</nowiki></code> = {{ItemLink|Sand (Scorched Earth)}}<br>
 
<code><nowiki>{{ItemLink|Sand (Scorched Earth)|Sand}}</nowiki></code> = {{ItemLink|Sand (Scorched Earth)|Sand}}
 
<code><nowiki>{{ItemLink|Sand (Scorched Earth)|Sand}}</nowiki></code> = {{ItemLink|Sand (Scorched Earth)|Sand}}
  +
  +
Mods that are supported will have the mod-part replaced with their icon
  +
  +
<code><nowiki>{{ItemLink|Mod:Ark Eternal/Alpha Meat}}</nowiki></code> = {{ItemLink|Mod:Ark Eternal/Alpha Meat}}
   
 
The parameter noDlcIcon hides the extra DLC-/mod-icon
 
The parameter noDlcIcon hides the extra DLC-/mod-icon

Latest revision as of 22:46, 3 January 2020

Template-info.png Documentation

Link to an item page with an item image in front: Stone

Also supports an optional quantity in front: 5 ×  Stone

Usage

{{ItemLink|Stone}}
Parameters
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

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 Scorched Earth Icon.png
{{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 Mod Ark Eternal Icon.png

The parameter noDlcIcon hides the extra DLC-/mod-icon

{{ItemLink|Sand (Scorched Earth)|noDlcIcon=1}} = Sand