Ad placeholder

Template:ItemIcon Internal/Debug: Difference between revisions

Jump to navigation Jump to search
Switch instead of replace?
(Properly close if)
(Switch instead of replace?)
Line 1: Line 1:
<includeonly><onlyinclude>{{#lvardef:is_missing
<includeonly><onlyinclude>{{#lvardef:rarity|{{#switch:{{{3|}}}
|very rare = very-rare
|{{{3|}}}
}} }}{{#lvardef:is_missing
|{{#expr: {{#if:{{{missing|}}}|1|0}} or {{#if:{{{1|}}}|0|1}} }}
|{{#expr: {{#if:{{{missing|}}}|1|0}} or {{#if:{{{1|}}}|0|1}} }}
}}<span {{#if:{{{4|}}}|class="bg3wiki-itemicon bg3wiki-itemicon-{{{3}}}"}} {{#ifexpr:{{#lvar:is_missing}}|style="width: {{{2}}}px; height: {{{2}}}px; display: inline-block; overflow: hidden; vertical-align: middle;"}}>{{Icon
}}<span {{#if:{{{4|}}}|class="bg3wiki-itemicon bg3wiki-itemicon-{{#lvar:rarity}}"}} {{#ifexpr:{{#lvar:is_missing}}|style="width: {{{2}}}px; height: {{{2}}}px; display: inline-block; overflow: hidden; vertical-align: middle;"}}>{{Icon
|{{#if:{{{1|}}}|{{{1}}}|{{{5|}}} Item Icon.png}}
|{{#if:{{{1|}}}|{{{1}}}|{{{5|}}} Item Icon.png}}
|{{{2}}}
|{{{2}}}
|link = {{{5|}}}
|link = {{{5|}}}
}}</span></onlyinclude></includeonly><noinclude>
}}</span></onlyinclude></includeonly><noinclude>
filename. Item icon name
1. Item icon name


2. Icon size
2. Icon size


rarity. Item rarity
3. Item rarity


4. Whether to show rarity
4. Whether to show rarity
Line 17: Line 20:


missing: If specified will use missing css
missing: If specified will use missing css
====Debug====
 
Debug version.
Used by [[Template:ItemIcon]] to format cargo results.
 
=== Examples ===
 
{{ItemIcon|name=Potion of Superior Healing|show_name=true}}
{{ItemIcon|name=Potion of Supreme Healing|show_name=true|show_rarity=true}}
{{ItemIcon|name=Missing|show_name=true|show_rarity=true}}
{{ItemIcon|name=Template:ItemIcon/Item Missing Images|show_name=true|show_rarity=true}}
</noinclude>
</noinclude>

Navigation menu