Ad placeholder

Template:Item icon: Difference between revisions

Jump to navigation Jump to search
Add icon override
(lower)
(Add icon override)
Line 1: Line 1:
<includeonly><onlyinclude>{{#lvardef:margin|{{#expr:0.01 * {{{size|40}}} }} }}{{#lvardef:size|{{{size|40}}} }}<span class="bg3wiki-itemicon-wrapper" {{#if:{{{no_padding|}}}||style="margin-left: {{#lvar:margin}}rem"}}>{{#cargo_query:
<includeonly><onlyinclude>{{#lvardef:margin|{{#expr:0.01 * {{{size|40}}} }} }}{{#lvardef:size|{{{size|40}}} }}<span class="bg3wiki-itemicon-wrapper" {{#if:{{{no_padding|}}}||style="margin-left: {{#lvar:margin}}rem"}}>{{#if:{{{override_icon|}}}|{{ItemIcon Internal|{{{override_icon}}}|{{#lvar:size}}|{{{override_rarity}}}|{{{show_rarity|}}}|{{{name}}} }}|{{#cargo_query:
tables=item_icon
tables=item_icon
|fields=TRIM(icon),CONCAT('', '{{#lvar:size}}'),LOWER(rarity),CONCAT('', '{{{show_rarity|}}}'),CONCAT('', "{{{name}}}")
|fields=TRIM(icon),CONCAT('', '{{#lvar:size}}'),LOWER(rarity),CONCAT('', '{{{show_rarity|}}}'),CONCAT('', "{{{name}}}")
Line 9: Line 9:
|format=template
|format=template
|template=ItemIcon Internal
|template=ItemIcon Internal
}} <span class="bg3wiki-itemicon-link" style="margin-left: {{#lvar:margin}}rem">{{#if:{{{show_name|}}}|[[{{{name}}}]] }}</span></span></onlyinclude></includeonly><noinclude>
}} }}<span class="bg3wiki-itemicon-link" style="margin-left: {{#lvar:margin}}rem">{{#if:{{{show_name|}}}|[[{{{name}}}]] }}</span></span></onlyinclude></includeonly><noinclude>


{{/doc}}
{{/doc}}
Line 44: Line 44:
"description": "Whether to link the icon as well. Optional. Providing any value at all will be interpreted as \"yes\".",
"description": "Whether to link the icon as well. Optional. Providing any value at all will be interpreted as \"yes\".",
"type": "boolean"
"type": "boolean"
}
},
"no_padding": {
"description": "Whether to remove exterior padding. Advanced use."
},
"show_rarity": {
"description": "Whether to show the rarity."
},
"override_icon": {},
"override_rarity": {}
},
},
"description": "Inserts an item's icon automatically. Can also display a link to the item.",
"description": "Inserts an item's icon automatically. Can also display a link to the item.",
Line 50: Line 58:
"name",
"name",
"size",
"size",
"show_name"
"show_name",
"no_padding",
"show_rarity",
"override_icon",
"override_rarity"
],
],
"format": "inline"
"format": "inline"
}
}
</templatedata></noinclude>
</templatedata></noinclude>

Navigation menu