Template:ItemIcon/doc: Difference between revisions

From The Deadlock Wiki
Jump to navigation Jump to search
No edit summary
Tag: Manual revert
mNo edit summary
 
(4 intermediate revisions by 3 users not shown)
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.
 
For more details, see [[Module:Icon]].


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


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

Latest revision as of 21:28, 18 May 2026

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

[edit source]
{{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
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