Template:ItemIcon: Difference between revisions

From The Deadlock Wiki
Jump to navigation Jump to search
added automatic subpage detection using if_lang template
Added auto localization of the item name
Line 7: Line 7:
|Spirit Lifesteal = Spirit Lifesteal (item)
|Spirit Lifesteal = Spirit Lifesteal (item)
|{{{1|}}}
|{{{1|}}}
}}{{If_lang}}|{{{2|{{{1|}}}}}}]]</span></includeonly><noinclude>{{Documentation}}</noinclude>
}}{{If_lang}}|{{{2|{{#invoke:Lang|get_string|{{#invoke:ItemData/name|get_item_key|{{{1|}}}}}}}}}}]]</span></includeonly><noinclude>{{Documentation}}</noinclude>

Revision as of 14:46, 7 April 2025

Template documentation [view] [edit] [history] [purge]

Usage

This template creates a small item icon. The label and link will be automatically translated on a language subpage.

For more details, see Module:Icon.

Examples

{{ItemIcon|Titanic Magazine}}
{{ItemIcon|Disarming Hex|l1=Hex}}
{{ItemIcon|Warp Stone|size=40px}}

Titanic Magazine Disarming Hex Warp Stone

Template parameters[Edit template data]

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
11

Item name.

Stringrequired
l1l1

Custom text.

Stringoptional
linklink

Custom link.

Stringoptional
imageimage

Custom image.

Example
Image.png, Image.svg
Stringoptional
sizesize

Icon size.

Default
20px
Example
30px, 40px, 50px
Stringoptional
no-linkno-link

Removes the target link.

Suggested values
true
Booleanoptional
no-fileno-file

Removes the file image.

Suggested values
true
Booleanoptional
icon-onlyicon-only

Removes any text.

Suggested values
true
Booleanoptional