Create ItemBox infobox template with TemplateData
 
Fix: use {{!}} instead of | for table pipes inside #if blocks
第1行: 第1行:
<noinclude>
<noinclude>
物品信息框模板。在道具、法宝、灵器等词条页面顶部使用。
物品信息框模板。在道具、法宝、灵器等词条页面顶部使用。
用法示例:
<pre>
{{ItemBox
| name    = 元磁子母剑
| image    = 元磁子母剑.jpg
| grade    = 极品法宝
| owner    = 唐浩
| maker    = 阳真魔君
| material = 元磁神石
}}
</pre>


<templatedata>
<templatedata>
第60行: 第72行:
</templatedata>
</templatedata>
</noinclude><includeonly>{| class="infobox biography vcard"
</noinclude><includeonly>{| class="infobox biography vcard"
|+ | '''{{#if:{{{name|}}}|{{{name}}}|{{PAGENAME}}}}'''
|+ '''{{#if:{{{name|}}}|{{{name}}}|{{PAGENAME}}}}'''
{{#if:{{{image|}}}|
{{#if:{{{image|}}}|
|-
|-
! colspan="2" style="text-align:center;" &#124; [[File:{{{image}}}|200px|alt={{#if:{{{name|}}}|{{{name}}}|{{PAGENAME}}}}]]}}
! colspan="2" style="text-align:center;" {{!}} [[File:{{{image}}}|200px]]}}
{{#if:{{{grade|}}}|
{{#if:{{{grade|}}}|
|-
|-
! 物品品阶
! 物品品阶
&#124; {{{grade|}}}}}
{{!}} {{{grade|}}}}}
{{#if:{{{type|}}}|
{{#if:{{{type|}}}|
|-
|-
! 物品类型
! 物品类型
&#124; {{{type|}}}}}
{{!}} {{{type|}}}}}
{{#if:{{{owner|}}}|
{{#if:{{{owner|}}}|
|-
|-
! 持有人
! 持有人
&#124; {{{owner|}}}}}
{{!}} {{{owner|}}}}}
{{#if:{{{maker|}}}|
{{#if:{{{maker|}}}|
|-
|-
! 打造人
! 打造人
&#124; {{{maker|}}}}}
{{!}} {{{maker|}}}}}
{{#if:{{{material|}}}|
{{#if:{{{material|}}}|
|-
|-
! 材质
! 材质
&#124; {{{material|}}}}}
{{!}} {{{material|}}}}}
{{#if:{{{use|}}}|
{{#if:{{{use|}}}|
|-
|-
! 用途
! 用途
&#124; {{{use|}}}}}
{{!}} {{{use|}}}}}
{{#if:{{{ability|}}}|
{{#if:{{{ability|}}}|
|-
|-
! 技能/能力
! 技能/能力
&#124; {{{ability|}}}}}
{{!}} {{{ability|}}}}}
|}</includeonly>
|}</includeonly>