Template:ItemIcon/doc: Difference between revisions

From The Deadlock Wiki
Jump to navigation Jump to search
No edit summary
Tag: Manual revert
m upd
Line 1: Line 1:
== Usage ==
== Usage ==
This icon template is used to create a small picture associated with an item.
This template creates a small item icon. The label and link will be automatically translated on a language subpage. See: [[Module:Icon/data]].


== Examples ==
== Examples ==
<pre style="width:50%">
<pre style="width:50%">
{{ItemIcon|Basic Magazine}}
{{ItemIcon|Titanic Magazine}}
{{ItemIcon|Disarming Hex|l1=Hex}}
{{ItemIcon|Warp Stone|size=40px}}
</pre>
</pre>
{{ItemIcon|Titanic Magazine}}
{{ItemIcon|Disarming Hex|l1=Hex}}
{{ItemIcon|Warp Stone|size=40px}}


{{ItemIcon|Basic Magazine}}
<templatedata>
 
{
<pre style="width:50%">
"params": {
{{ItemIcon|Basic Magazine|Custom}}
"1": {
</pre>
"description": "Item name.",
 
"type": "string",
{{ItemIcon|Basic Magazine|Custom}}
"required": true
 
},
=== Parameters ===
"l1": {
; p1 : Item name (required).
"description": "Custom text.",
; p2 : Custom name (optional).
"type": "string"
; size : Size (optional). Default is 20px.
},
; icon : Custom icon (optional)
"size": {
<includeonly>[[Category:Icon templates]]</includeonly><noinclude>[[Category:Template documentation]]</noinclude>
"default": "20px",
"type": "string",
"description": "Icon size.",
"suggestedvalues": [
"30px",
"40px",
"50px"
]
},
"no-link": {
"description": "Removes the link.",
"type": "boolean",
"suggestedvalues": [
"true"
]
},
"icon-only": {
"type": "boolean",
"suggestedvalues": [
"true"
],
"description": "Hides any text."
}
},
"format": "inline",
"description": ""
}
</templatedata><includeonly>[[Category:Icon templates]]</includeonly><noinclude>[[Category:Template documentation]]</noinclude>

Revision as of 21:53, 21 May 2025

Usage

This template creates a small item icon. The label and link will be automatically translated on a language subpage. See: Module:Icon/data.

Examples

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

Titanic Magazine Hex Warp Stone

Template parameters

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
11

Item name.

Stringrequired
l1l1

Custom text.

Stringoptional
sizesize

Icon size.

Suggested values
30px 40px 50px
Default
20px
Stringoptional
no-linkno-link

Removes the link.

Suggested values
true
Booleanoptional
icon-onlyicon-only

Hides any text.

Suggested values
true
Booleanoptional