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
unnamed parameter index fix
wgg>CadsBot
removed redundant start/end
Line 1: Line 1:
{{doc/start}}
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 65: Line 64:
<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}}


{{doc/end}}


<!-- Apparently templatedata is not supported, but if it was... -->
<!-- Apparently templatedata is not supported, but if it was... -->

Revision as of 13:30, 11 October 2025

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
1 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 16x16px
quantity 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}} = Stone
Alternative: {{ItemLink|Stone}}s = Stones

Quantity:

{{ItemLink|Stone|quantity=5}} = 5 ×  Stone
{{ItemLink|Stone|quantity=5-10}} = 5-10 ×  Stone