Changes
Jump to navigation
Jump to search
← Older edit
Newer edit →
Template:ItemBox
272 bytes added
,
21: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>{{
Item
itemBox
|name=Hammer *** defaults to {{PAGENAME}} ***
|image=hammer.jpg *** defaults to {{PAGENAME}}.jpg or {{PAGENAME}}.png ***
</pre>
<pre>{{
Item
itemBox
|name=Huge shod club *** defaults to {{PAGENAME}} ***
|result=1 '''huge shod club''' (15.00 kg)
<pre>
{{
Item
itemBox
|image=Iron fence.jpg
|name=Iron fence
<pre>
{{
Item
itemBox
|image=Felled_Tree.jpg
|name=Felled Tree
Joedobo
380
edits
Navigation menu
Personal tools
Create account
Dark mode
Log in
Namespaces
Template
Discussion
Variants
Views
Read
View source
View history
More
Search
Navigation
Main page
Get involved
Recent changes
Help
Wurmpedia
About
Register
Maps
Basic knowledge
Key binds
Chat commands
Permissions
Random article
Wurm Online
Website
Forums
Register
Play
Discord
Wurm Unlimited
Steam page
Official Forum
Steam Discussion
Tools
Special pages
Printable version