Changes

Jump to navigation Jump to search

Template:ItemBox

272 bytes added, 13:50, 24 March 2015
Add categories based on passive targeted item, fixed code in examples
{{#if:{{{skill|}}}|[[Category:{{{skill}}} items]]}}
[[Category:Items]]
 
<!-- Add appropriate categories for various creations as indicated by the passive targeted item -->
{{#switch: {{lc:{{{passive|}}}}}
| roof plan=[[Category:Roofs]] [[Category:Structures]]
| wall plan=[[Category:Walls]] [[Category:Structures]]
| #default=
}}
 
<!-- If (1 creation and (2 anyone from the create group - active and passive and [3)- at least one of group or groupM or TopMost or assemble must be NOT empty] and materials and result and skill - are empty add to Incomplete item templates -->
{{#if:{{{creation|}}}||{{#if:{{#if: {{{active|}}} |{{#if: {{{passive|}}} |{{#if:{{#if: {{{group|}}}|{{{group|}}}|{{#if: {{{groupM|}}}|{{{groupM|}}}|{{#if: {{{TopMost|}}}|{{{TopMost|}}}|{{#if:{{{assemble|}}}|{{{assemble|}}}|}}}}}}}}|{{#if: {{{materials|}}}|{{#if: {{{result|}}} | {{{skill|}}} }}}}}}}}}}||[[Category:Incomplete item templates]]}}}}
Usage examples:
<pre>{{ItemitemBox
|name=Hammer *** defaults to {{PAGENAME}} ***
|image=hammer.jpg *** defaults to {{PAGENAME}}.jpg or {{PAGENAME}}.png ***
</pre>
<pre>{{ItemitemBox
|name=Huge shod club *** defaults to {{PAGENAME}} ***
|result=1 '''huge shod club''' (15.00 kg)
<pre>
{{ItemitemBox
|image=Iron fence.jpg
|name=Iron fence
<pre>
{{ItemitemBox
|image=Felled_Tree.jpg
|name=Felled Tree
380

edits

Navigation menu