Template:Item icon: Difference between revisions

From Space Station 14 Wiki
Template:Item icon
(uses lua notice)
(fix)
Tag: Redirect target changed
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
<includeonly><!--
#REDIRECT [[Template:Item]]
--><templatestyles src="Item icon/styles.css" /><!--
 
-->{{#vardefine: icon_size|{{{size|24px}}}}}<!--
 
-->{{#vardefine: icon_item_id|{{#invoke: Item|lookup_item_id_by_name|{{{1}}}}}<!--/vardefine-->}}<!--
 
-->{{#iferror: {{#var:icon_item_id}}
|{{#var:icon_item_id}}
|{{#vardefine: icon_file|{{#invoke: Item|lookup_item_image_by_id|{{#var:icon_item_id}}}}<!--/vardefine-->}}<!--
   
    -->{{#iferror: {{#var:icon_file}}
        |{{#var:icon_file}}
        |{{#vardefine: icon_label|{{#invoke: Item|lookup_item_name_by_id|{{#var:icon_item_id}}}}<!--/vardefine-->}}<!--
 
--><span class="item-icon"><!--
--><span class="item-icon-icon">[[File:{{#var:icon_file}}|{{#var: icon_size}}]]</span><!--
--><span class="item-icon-label">'''{{{label|{{{l|{{#var:icon_label}}}}}<!--/label-->}}}'''</span><!--
--></span>
    }}
}}</includeonly><noinclude>
{{docs|bb=
{{uses lua|Item}}
{{uses template styles}}
}}
 
[[Category:Image templates]]
[[Category:Template starter-kit]]
<templatedata>
{
"params": {
"1": {
"label": "Item",
"description": "What item are you looking for? Any casing is allowed, including lowercase.",
"type": "line",
"required": true,
"example": "lv coil"
},
"size": {
"label": "Size",
"description": "Icon size",
"type": "line",
"default": "24px",
"suggested": true
},
"label": {
"label": "Label",
"description": "Label override.",
"type": "line",
"suggested": true,
"aliases": [
"l"
]
}
},
"paramOrder": [
"1",
"size",
"label"
]
}
</templatedata>
</noinclude>

Latest revision as of 07:49, 17 August 2024

Redirect to: