Template:Infobox Item: Difference between revisions
Appearance
Force re-parse for category links |
Move categories outside includeonly with namespace guard to fix template self-categorization |
||
| Line 1: | Line 1: | ||
<includeonly><table class="wikitable" style="float:right; margin-left:1em;"><tr><th colspan="2">{{{name|{{PAGENAME}}}}}</th></tr>{{#if:{{{image|}}}|<tr><td colspan="2" style="text-align:center;">[[File:{{{image}}}|250px]]</td></tr>}}{{#if:{{{type|}}}|<tr><td>'''Type'''</td><td>{{{type}}}</td></tr>}}{{#if:{{{wielder|}}}|<tr><td>'''Wielder'''</td><td>{{{wielder}}}</td></tr>}}{{#if:{{{found_date|}}}|<tr><td>'''Found'''</td><td>{{{found_date}}}</td></tr>}}{{#if:{{{found_by|}}}|<tr><td>'''Found By'''</td><td>{{{found_by}}}</td></tr>}}{{#if:{{{creator|}}}|<tr><td>'''Creator'''</td><td>{{{creator}}}</td></tr>}}{{#if:{{{enchantments|}}}|<tr><td>'''Enchantments'''</td><td>{{{enchantments}}}</td></tr>}}{{#if:{{{kills|}}}|<tr><td>'''Player Kills'''</td><td>{{{kills}}}</td></tr>}}{{#if:{{{kill_list|}}}|<tr><td>'''Kill List'''</td><td>{{{kill_list}}}</td></tr>}}{{#if:{{{mob_kills|}}}|<tr><td>'''Mob Kills'''</td><td>{{{mob_kills}}}</td></tr>}}{{#if:{{{damage_dealt|}}}|<tr><td>'''Damage Dealt'''</td><td>{{{damage_dealt}}}</td></tr>}}{{#if:{{{durability|}}}|<tr><td>'''Durability'''</td><td>{{{durability}}}</td></tr>}}{{#if:{{{location|}}}|<tr><td>'''Location'''</td><td>{{{location}}}</td></tr>}}{{#if:{{{status|}}}|<tr><td>'''Status'''</td><td>{{{status}}}</td></tr>}}</table>{{#ifeq:{{NAMESPACE}}|Template||[[Category:Items]]{{#ifeq:{{lc:{{{type|}}}}}|weapon|[[Category:Weapons]]}}}} | <includeonly><table class="wikitable" style="float:right; margin-left:1em;"><tr><th colspan="2">{{{name|{{PAGENAME}}}}}</th></tr>{{#if:{{{image|}}}|<tr><td colspan="2" style="text-align:center;">[[File:{{{image}}}|250px]]</td></tr>}}{{#if:{{{type|}}}|<tr><td>'''Type'''</td><td>{{{type}}}</td></tr>}}{{#if:{{{wielder|}}}|<tr><td>'''Wielder'''</td><td>{{{wielder}}}</td></tr>}}{{#if:{{{found_date|}}}|<tr><td>'''Found'''</td><td>{{{found_date}}}</td></tr>}}{{#if:{{{found_by|}}}|<tr><td>'''Found By'''</td><td>{{{found_by}}}</td></tr>}}{{#if:{{{creator|}}}|<tr><td>'''Creator'''</td><td>{{{creator}}}</td></tr>}}{{#if:{{{enchantments|}}}|<tr><td>'''Enchantments'''</td><td>{{{enchantments}}}</td></tr>}}{{#if:{{{kills|}}}|<tr><td>'''Player Kills'''</td><td>{{{kills}}}</td></tr>}}{{#if:{{{kill_list|}}}|<tr><td>'''Kill List'''</td><td>{{{kill_list}}}</td></tr>}}{{#if:{{{mob_kills|}}}|<tr><td>'''Mob Kills'''</td><td>{{{mob_kills}}}</td></tr>}}{{#if:{{{damage_dealt|}}}|<tr><td>'''Damage Dealt'''</td><td>{{{damage_dealt}}}</td></tr>}}{{#if:{{{durability|}}}|<tr><td>'''Durability'''</td><td>{{{durability}}}</td></tr>}}{{#if:{{{location|}}}|<tr><td>'''Location'''</td><td>{{{location}}}</td></tr>}}{{#if:{{{status|}}}|<tr><td>'''Status'''</td><td>{{{status}}}</td></tr>}}</table></includeonly>{{#ifeq:{{NAMESPACE}}|Template||[[Category:Items]]{{#ifeq:{{lc:{{{type|}}}}}|weapon|[[Category:Weapons]]}}}}<noinclude> | ||
<noinclude> | |||
== Usage == | == Usage == | ||
<pre> | <pre> | ||
| Line 25: | Line 24: | ||
Auto-categorization: all pages get [[Category:Items]]. If <code>type=weapon</code>, also [[Category:Weapons]]. | Auto-categorization: all pages get [[Category:Items]]. If <code>type=weapon</code>, also [[Category:Weapons]]. | ||
</noinclude> | </noinclude> | ||
Revision as of 02:38, 4 March 2026
Usage
{{Infobox Item
| name =
| image =
| type = weapon / armor / tool / misc
| wielder =
| found_date =
| found_by =
| creator =
| enchantments =
| kills =
| kill_list =
| mob_kills =
| damage_dealt =
| durability =
| location =
| status =
}}
All fields are optional. name defaults to {{PAGENAME}}.
Auto-categorization: all pages get . If type=weapon, also .