{{Cmbox}}(Category message box,分类信息框)是用于分类页面的消息框元模板。它提供多种不同的颜色,未指定图片时使用预设图片。
该模板与 {{Ambox}} 几乎相同,使用同样的参数。
常用参数
| 参数 |
说明
|
type |
speedy / delete / content / style / notice / move / protection
|
image |
自定义图标(none 则不显示图片)
|
imageright |
右侧图片
|
style |
整个信息框的 CSS 样式
|
textstyle |
文字单元格的 CSS 样式
|
text |
消息正文
|
type 类型
以下示例使用不同的 type 参数,不指定 image 时使用各 type 对应的预设图片。
 | type=speedy 快速删除 |
 | type=delete 删除 |
 | type=content 大警告与问题 |
 | type=style 小警告与问题 |
 | type=notice 各种提示与信息 |
 | type=move 移动、合并与分割 |
 | type=protection 页面保护 |
特殊设定
 | 未指定 type 和 image(默认) |
| image=none — 不使用图片,text 占用整个信息框区域 |
参数说明
{{cmbox
| type = speedy / delete / content / style / notice / move / protection
| image = none / [[File:Some image.svg|40px]]
| imageright = [[File:Some image.svg|40px]]
| style = CSS 取值
| textstyle = CSS 取值
| text = 消息正文
}}
技术细节
如需在 text 参数中使用特殊字符:
{{cmbox
| text =
等号 = 与前后大括号 { } 可以正常使用。
但管道符 {{!}} 与两个后大括号 <nowiki>}}</nowiki> 不能直接使用。
同时使用需加 nowiki 标记 <nowiki>|}}</nowiki>。
}}
此模板使用 CSS 类确定显示风格。内部使用 HTML 表格标记,这是元模板常见做法。
参见