模板:统计卡片:修订间差异
更多
无编辑摘要 |
按新大纲重组编写指南、三类标准页与全模板说明;修复可选信息行结构 |
||
| (未显示同一用户的1个中间版本) | |||
| 第1行: | 第1行: | ||
< | <includeonly>{{数据统计|数值={{PAGESINCATEGORY:{{{category|}}}|{{{type|pages}}}}}|标签={{{label|统计}}}}}</includeonly><noinclude> | ||
统计栏的分类计数卡片;category 是实际分类名,type 为 pages 等计数类型。示例显示当前本地 Wiki 的实际分类计数。 | |||
=== | 在可视化编辑器中选择“插入 → 模板”,搜索 <code>统计卡片</code>。本模板属于组合结构,推荐在源代码编辑器中复制下面的完整组合,保留配套模板。 | ||
== 效果 == | |||
<div class="mc-example-preview"> | |||
{{统计栏头}} | |||
{{统计卡片|category=ARG档案|type=pages|label=实际分类页数}} | |||
{{统计栏尾}} | |||
</div> | |||
== 源代码 == | |||
<div class="mc-example-source"><pre>{{统计栏头}} | |||
{{统计卡片|category=ARG档案|type=pages|label=实际分类页数}} | |||
{{统计栏尾}}</pre></div> | |||
== 参数 == | |||
{| class="wikitable" | {| class="wikitable" | ||
! 参数名 !! | ! 参数名 !! 用法 | ||
|- | |- | ||
| <code> | | <code>category</code> || 实际存在的分类名称,不带“分类:”前缀。 | ||
|- | |- | ||
| <code> | | <code>type</code> || 分类统计类型,如 pages;不是任意标签文字。 | ||
|- | |- | ||
| <code> | | <code>label</code> || 按示例填写此字段;允许的内容见模板参数表。 | ||
|} | |} | ||
[[模板说明#统计卡片|全部模板说明]] · [[编写指南]] | |||
<templatedata> | <templatedata> | ||
{ | { | ||
"description": "统计栏的分类计数卡片;category 是实际分类名,type 为 pages 等计数类型。示例显示当前本地 Wiki 的实际分类计数。", | |||
"format": "block", | |||
"params": { | |||
"category": { | |||
"label": "category", | |||
"type": "content", | |||
"description": "实际存在的分类名称,不带“分类:”前缀。" | |||
}, | |||
"type": { | |||
"label": "type", | |||
"type": "content", | |||
"description": "分类统计类型,如 pages;不是任意标签文字。" | |||
}, | |||
"label": { | |||
"label": "label", | |||
"type": "content", | |||
"description": "按示例填写此字段;允许的内容见模板参数表。" | |||
} | |||
}, | |||
"paramOrder": [ | |||
"category", | |||
"type", | |||
"label" | |||
] | |||
} | } | ||
</templatedata></noinclude> | </templatedata> | ||
</noinclude> | |||
2026年10月13日 (二) 15:57的最新版本
统计栏的分类计数卡片;category 是实际分类名,type 为 pages 等计数类型。示例显示当前本地 Wiki 的实际分类计数。
在可视化编辑器中选择“插入 → 模板”,搜索 统计卡片。本模板属于组合结构,推荐在源代码编辑器中复制下面的完整组合,保留配套模板。
效果
25
实际分类页数
源代码
{{统计栏头}}
{{统计卡片|category=ARG档案|type=pages|label=实际分类页数}}
{{统计栏尾}}参数
| 参数名 | 用法 |
|---|---|
category |
实际存在的分类名称,不带“分类:”前缀。 |
type |
分类统计类型,如 pages;不是任意标签文字。 |
label |
按示例填写此字段;允许的内容见模板参数表。 |
统计栏的分类计数卡片;category 是实际分类名,type 为 pages 等计数类型。示例显示当前本地 Wiki 的实际分类计数。
| 参数 | 描述 | 类型 | 状态 | |
|---|---|---|---|---|
| category | category | 实际存在的分类名称,不带“分类:”前缀。 | 内容 | 可选 |
| type | type | 分类统计类型,如 pages;不是任意标签文字。 | 内容 | 可选 |
| label | label | 按示例填写此字段;允许的内容见模板参数表。 | 内容 | 可选 |