Please note that some information on this wiki is still based on the demo version.
If you notice any errors, feel free to correct them.
Template:ItemLink/doc: Difference between revisions
From Super Fantasy Kingdom Official Wiki
wgg>Cadaei from https://ark.wiki.gg/wiki/Template:ItemLink/doc |
clarified 1st and second position |
||
| (6 intermediate revisions by 4 users not shown) | |||
| Line 1: | Line 1: | ||
Link to an item page with an item image in front: {{ItemLink|Stone}} | Link to an item page with an item image in front: {{ItemLink|Stone}} | ||
| Line 6: | Line 5: | ||
== Usage == | == Usage == | ||
<nowiki>{{ItemLink|Stone}}</nowiki> | <nowiki>{{ItemLink|Stone}}</nowiki> | ||
* first position= name of link, text and image (image can be changed with the additional parameter) | |||
* second position= the text shown (leaving empty makes it use the first position parameter) | |||
{| class="wikitable" | {| class="wikitable" | ||
|+ Parameters | |+ Additional Parameters | ||
|- | |- | ||
! Name !! Type !! Required !! Default | ! Name !! Type !! Required !! Default | ||
|- | |- | ||
|| <code>image</code> | || <code>image</code> | ||
| Line 35: | Line 20: | ||
|| <code>string</code> | || <code>string</code> | ||
|| <code>false</code> | || <code>false</code> | ||
|| | || 16x16px | ||
|- | |- | ||
|| <code>quantity</code> | || <code>quantity</code> | ||
| Line 48: | Line 33: | ||
<code><nowiki>{{ItemLink|Stone}}</nowiki></code> = {{ItemLink|Stone}} | <code><nowiki>{{ItemLink|Stone}}</nowiki></code> = {{ItemLink|Stone}} | ||
<code><nowiki>{{ItemLink|Stone| | <code><nowiki>{{ItemLink|Stone|Stone|image=Stone.png|size=20px|quantity=}}</nowiki></code> = {{ItemLink|Stone|Stone|link=Stone|image=Stone.png|size=20px|quantity=}} | ||
Lowercase link: | Lowercase link: | ||
<code><nowiki>{{ItemLink|Stone|stone}}</nowiki></code> = {{ItemLink|Stone|stone}} | <code><nowiki>{{ItemLink|Stone|stone}}</nowiki></code> = {{ItemLink|Stone|stone}} | ||
Plural link: | Plural link: | ||
<code><nowiki>{{ItemLink|Stone| | <code><nowiki>{{ItemLink|Stone|Stones}}</nowiki></code> = {{ItemLink|Stone|Stones}}<br/> | ||
Alternative: <code><nowiki>{{ItemLink|Stone}}s</nowiki></code> = {{ItemLink|Stone}}s | Alternative: <code><nowiki>{{ItemLink|Stone}}s</nowiki></code> = {{ItemLink|Stone}}s | ||
| Line 65: | Line 49: | ||
<code><nowiki>{{ItemLink|Stone|quantity=5-10}}</nowiki></code> = {{ItemLink|Stone|quantity=5-10}} | <code><nowiki>{{ItemLink|Stone|quantity=5-10}}</nowiki></code> = {{ItemLink|Stone|quantity=5-10}} | ||
<!-- Apparently templatedata is not supported, but if it was... --> | <!-- Apparently templatedata is not supported, but if it was... --> | ||
| Line 107: | Line 90: | ||
} | } | ||
</templatedata> | </templatedata> | ||
--> | --><noinclude>[[Category:Template documentation]]</noinclude> | ||
Latest revision as of 12:35, 27 June 2026
Link to an item page with an item image in front:
Stone
Also supports an optional quantity in front: 5 ×
Stone
Usage
{{ItemLink|Stone}}
- first position= name of link, text and image (image can be changed with the additional parameter)
- second position= the text shown (leaving empty makes it use the first position parameter)
| Name | Type | Required | Default |
|---|---|---|---|
image
|
string
|
false
|
The value of the first positional parameter suffixed with .png
|
size
|
string
|
false
|
16x16px |
quantity
|
string
|
false
|
Examples
Both lines produce the same output:
{{ItemLink|Stone}} =
Stone
{{ItemLink|Stone|Stone|image=Stone.png|size=20px|quantity=}} =
Stone
Lowercase link:
{{ItemLink|Stone|stone}} =
stone
Plural link:
{{ItemLink|Stone|Stones}} =
Stones
Alternative: {{ItemLink|Stone}}s =
Stones
Quantity:
{{ItemLink|Stone|quantity=5}} = 5 ×
Stone
{{ItemLink|Stone|quantity=5-10}} = 5-10 ×
Stone


