跳转到内容

模板:CharacterBox:修订间差异

来自槌基百科
Create CharacterBox infobox template with TemplateData
 
Fix: use {{!}} instead of | for table pipes inside #if blocks
第1行: 第1行:
<noinclude>
<noinclude>
人物信息框模板。在角色词条页面顶部使用。
人物信息框模板。在角色词条页面顶部使用。
用法示例:
<pre>
{{CharacterBox
| name      = 唐浩
| image      = 唐浩.jpg
| aliases    = 张寒、魂天帝
| location  = 不定
| faction    = 万兽门
| identity  = 客卿
| age        = 34岁
| race      = 人族
| cultivation= 半步元婴
| skills    = 灵血神通
}}
</pre>


<templatedata>
<templatedata>
第77行: 第93行:
</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:{{{aliases|}}}|
{{#if:{{{aliases|}}}|
|-
|-
! 别称
! 别称
&#124; {{{aliases|}}}}}
{{!}} {{{aliases|}}}}}
{{#if:{{{location|}}}|
{{#if:{{{location|}}}|
|-
|-
! 所处地
! 所处地
&#124; {{{location|}}}}}
{{!}} {{{location|}}}}}
{{#if:{{{faction|}}}|
{{#if:{{{faction|}}}|
|-
|-
! 所属势力
! 所属势力
&#124; {{{faction|}}}}}
{{!}} {{{faction|}}}}}
{{#if:{{{identity|}}}|
{{#if:{{{identity|}}}|
|-
|-
! 身份
! 身份
&#124; {{{identity|}}}}}
{{!}} {{{identity|}}}}}
{{#if:{{{position|}}}|
{{#if:{{{position|}}}|
|-
|-
! 职位
! 职位
&#124; {{{position|}}}}}
{{!}} {{{position|}}}}}
{{#if:{{{age|}}}|
{{#if:{{{age|}}}|
|-
|-
! 年龄
! 年龄
&#124; {{{age|}}}}}
{{!}} {{{age|}}}}}
{{#if:{{{race|}}}|
{{#if:{{{race|}}}|
|-
|-
! 种族
! 种族
&#124; {{{race|}}}}}
{{!}} {{{race|}}}}}
{{#if:{{{cultivation|}}}|
{{#if:{{{cultivation|}}}|
|-
|-
! 修为
! 修为
&#124; {{{cultivation|}}}}}
{{!}} {{{cultivation|}}}}}
{{#if:{{{aptitude|}}}|
{{#if:{{{aptitude|}}}|
|-
|-
! 资质
! 资质
&#124; {{{aptitude|}}}}}
{{!}} {{{aptitude|}}}}}
{{#if:{{{skills|}}}|
{{#if:{{{skills|}}}|
|-
|-
! 技能
! 技能
&#124; {{{skills|}}}}}
{{!}} {{{skills|}}}}}
|}</includeonly>
|}</includeonly>

2026年3月12日 (四) 11:45的版本

人物信息框模板。在角色词条页面顶部使用。

用法示例:

{{CharacterBox
| name       = 唐浩
| image      = 唐浩.jpg
| aliases    = 张寒、魂天帝
| location   = 不定
| faction    = 万兽门
| identity   = 客卿
| age        = 34岁
| race       = 人族
| cultivation= 半步元婴
| skills     = 灵血神通
}}

<templatedata> {

   "description": "角色/人物信息卡片",
   "params": {
       "name": {
           "label": "名称",
           "description": "角色名称,留空则自动使用页面标题",
           "type": "string",
           "suggested": true
       },
       "image": {
           "label": "图片",
           "description": "图片文件名,例如:唐浩.jpg",
           "type": "wiki-file-name",
           "suggested": true
       },
       "aliases": {
           "label": "别称",
           "description": "其他名字或绰号",
           "type": "string"
       },
       "location": {
           "label": "所处地",
           "description": "角色所在的地点或区域",
           "type": "string",
           "suggested": true
       },
       "faction": {
           "label": "所属势力",
           "description": "门派、家族或阵营",
           "type": "string",
           "suggested": true
       },
       "identity": {
           "label": "身份",
           "description": "职务、称号或身份",
           "type": "string",
           "suggested": true
       },
       "position": {
           "label": "职位",
           "description": "具体职位或官职",
           "type": "string"
       },
       "age": {
           "label": "年龄",
           "description": "角色年龄",
           "type": "string"
       },
       "race": {
           "label": "种族",
           "description": "人族、妖族、异火等",
           "type": "string",
           "suggested": true
       },
       "cultivation": {
           "label": "修为",
           "description": "修炼境界,例如:金丹期、元婴期",
           "type": "string"
       },
       "aptitude": {
           "label": "资质",
           "description": "灵根资质",
           "type": "string"
       },
       "skills": {
           "label": "技能",
           "description": "主要技能、神通或法宝",
           "type": "string"
       }
   },
   "paramOrder": ["name","image","aliases","location","faction","identity","position","age","race","cultivation","aptitude","skills"]

} </templatedata>