模板:Database detail
出自Meshal Lite
第1行: | 第1行: | ||
− | <includeonly>{{#vardefine:pages|{{#dpl:debug=0|namespace={{ucfirst:{{{namespace|{{{1|}}}}}}}}|category={{{category|{{{2|}}}}}}|mode=userformat|resultsheader=%PAGES%}}}} | + | <includeonly>{{#vardefine:pages|{{#dpl:debug=0|includesubpages={{{subpage|{{{6|false}}}}}}|namespace={{ucfirst:{{{namespace|{{{1|}}}}}}}}|category={{{category|{{{2|}}}}}}|mode=userformat|resultsheader=%PAGES%}}}} |
− | {{tab|collapse=y|expand=y|style= | + | {{tab|collapse=y|expand={{#ifeq: {{{expand|{{{8|y}}}}}}|y|y|n}}|style=n|width={{{width|{{{3|480px}}}}}}}} |
− | !style="font-weight: bold; border-style: none none dotted none; background: #eee; caption-side:left; text-align: left;"|{{{category|{{{2|}}}}}} ({{#ifeq:{{#var:pages}}||0|{{#var:pages}}}}) | + | !style="font-weight: bold; border-style: none none dotted none; background: #eee; caption-side:left; text-align: left;"|{{{name|{{{4|{{{category|{{{2|}}}}}}}}}}}} ({{#ifeq:{{#var:pages}}||0|{{#var:pages}}}}) |
|- | |- | ||
− | |{{#dpl:debug=0|namespace={{ucfirst:{{{namespace|{{{1|}}}}}}}}|category={{{category|{{{2|}}}}}}|shownamespace=false|format=,²{:%PAGE%}²,,|columns=1}} | + | |style="border:none;"|{{#dpl:debug=0|includesubpages={{{subpage|{{{6|false}}}}}}|namespace={{ucfirst:{{{namespace|{{{1|}}}}}}}}|category={{{category|{{{2|}}}}}}|shownamespace=false|format=,{{#ifeq: {{{linkonly|{{{9|n}}}}}}|y| |
− | |}</includeonly><noinclude>[[category:编辑]][[category:模板]] | + | * '''[[%PAGE%|%TITLE%]]'''\n |
− | + | |²{:%PAGE%¦call={{{call|{{{7|1}}}}}}}²}},,|columns=1|count={%DPL_count:{{{count|{{{5|50}}}}}}%}|scroll=yes|resultsheader = <!-- | |
+ | dir:%SCROLLDIR% pages:%PAGES% total:%TOTALPAGES% firsttitle:%FIRSTTITLE% lasttitle:%LASTTITLE% page:²{FULLPAGENAME}² sum:{{#var:pages}}--> | ||
+ | ²{database_nav¦dir=%SCROLLDIR%¦pages=%PAGES%¦total=%TOTALPAGES%¦firsttitle=%FIRSTTITLE%¦lasttitle=%LASTTITLE%¦page=²{FULLPAGENAME}²¦sum={{#var:pages}}}²\n|resultsfooter = ²{database_nav¦dir=%SCROLLDIR%¦pages=%PAGES%¦total=%TOTALPAGES%¦firsttitle=%FIRSTTITLE%¦lasttitle=%LASTTITLE%¦page=²{FULLPAGENAME}²¦sum={{#var:pages}}}²\n}} | ||
+ | |} | ||
+ | </includeonly><noinclude>[[category:编辑]][[category:模板]] | ||
== 模板说明 == | == 模板说明 == | ||
− | + | 这个模板被用在分类的页面中, 用来罗列在该分类下条目预览(直接罗列显示所有符合条件的条目内容). | |
− | + | ||
=== 参数 === | === 参数 === | ||
− | + | ;1或namespace | |
− | + | :要查询的名字空间, 可以是Ability, Buff, Item. '''需要注意, 这是大小写敏感的, 并且会自动将第一个字符变成大写.''' 如果要做多重条件查询, 每个条件之间要用"¦"来进行分割, 而不是"|". | |
− | + | ;2或category | |
− | + | : 要查询的分类名称. 如果要做多重条件查询, 每个条件之间要用"¦"来进行分割, 而不是"|". | |
− | |} | + | ;3或width |
+ | : 显示用的表格宽度, 默认为480px | ||
+ | ;4或name | ||
+ | : 条目框体的显示名称, 默认和category一样 | ||
+ | ;5或count | ||
+ | : 每次罗列出的条目数量(结果过多即会形成翻页列表), 默认为50. | ||
+ | ;6或subpage | ||
+ | : 是否包含子页面, 可以是"true"或"false", 默认为false. | ||
+ | ;7或call | ||
+ | : 是否在罗列的条目内显示其他页面调用(只适用于已经使用<nowiki>{{#ifeq:{{{call|1}}}|1||}}</nowiki>的条目. 为0时不显示, 为1显示. 默认为1. linkonly=y时此参数无效. | ||
+ | ;8或expand | ||
+ | : 是否以展开方式显示, 可以是y或n, 默认为y. linkonly=y时此参数无效. | ||
+ | ;9或linkonly | ||
+ | : 是否只是以链接的方式显示, 可以使y或n, 默认为n. | ||
=== 使用 === | === 使用 === | ||
− | + | <source lang="text"> | |
− | + | {{database_detail|名字空间|分类}} | |
− | + | </source> | |
− | + | ||
− | + | ||
</noinclude> | </noinclude> |