Template:Infobox enchantment: Difference between revisions

m Majority of enchantments have no incompatibilities, so making this hidden if value not set
adding id and changing name to default to page
Line 1: Line 1:
{{#invoke:infobox|infobox
<includeonly>{{#invoke:infobox|infobox
|title={{{1}}}
|title={{#if: {{{1|}}}|{{{1}}}|{{BASEPAGENAME}}}}
|imagearea=none
|imagearea=none
|rows=
|rows=
Line 9: Line 9:
{{#if: {{{incompat|}}} | {{infobox row|Incompatible with|{{{incompat|}}} }} }}
{{#if: {{{incompat|}}} | {{infobox row|Incompatible with|{{{incompat|}}} }} }}
{{#if: {{{sounds|}}} |  {{infobox row|Sounds          |{{{sounds  |}}} }} }}
{{#if: {{{sounds|}}} |  {{infobox row|Sounds          |{{{sounds  |}}} }} }}
}}<noinclude>
| {{infobox row|label=[[Data values|Enchantment ID]]|field={{
{{documentation|content=
  #if: {{{nameid|{{{id|}}}}}}
This template provides a uniform design for the infobox on the [[Enchanting]] page.
  | <div style="word-break:break-all">{{{nameid|{{{id}}}}}}</div>
{{pipe escape|
  | {{#if: {{NAMESPACE}}
{| class{{=}}"wikitable"
    | ?
! Parameter
    | <div style="word-break:break-all">{{lc: {{#replace: {{#if: {{{title|}}} | {{{title}}} | {{BASEPAGENAME}} }} || _ }} }}</div>
! Function
    }}
! Default value
  }}}}
|-
| <code>1</code>
| The enchantment's name
| ''None''
|-
| <code>maxlevel</code>
| The enchantment's maximum level
|
|-
| <code>primaryitems</code>
| Items which can be offered the enchantment by an enchantment table
| ''None''
|-
| <code>secondaryitems</code>
| Other legitimate items
| ''None''
|-
| <code>weight</code>
| The enchantment's relative probability of being offered
|-
| <code>incompat</code>
| Other enchantments incompatible with this one
| (not shown)
|-
| <code>sounds</code>
| Sounds made when enchantment takes effect (if any)
| (not shown)
|-
|}
}}
}}
 
}}</includeonly>
}}
{{documentation}}
 
[[Category:Infobox templates]]
</noinclude>