模板:Mbox/doc
| 此页面是Template:Mbox的文档子页面。 此页面可能包含了使用说明、分类和其他内容,这些内容不属于原始Template页面。 |
| 此模板使用Lua语言: |
{{Mbox}}(multi namespace message box,多命名空间消息框)是一个元模板,用于根据页面所在命名空间自动选择对应的消息框样式。它内部调用 {{Ambox}}(条目)、{{Tmbox}}(讨论)、{{Imbox}}(文件)、{{Cmbox}}(分类)和 {{Ombox}}(其他页面)。
本模板仅用于需要在多个命名空间中显示且需要自动适配样式的消息框。一般情况下,建议直接使用 {{Ambox}}、{{Tmbox}} 等具体模板——这样模板在其自身页面和任何使用位置外观一致,编辑者能清楚其用途,同时也减轻服务器负担。
参数
{{mbox
| demospace = {{{demospace|}}} / main / talk / file / category / other
| 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 = 消息正文
| small = {{{small|}}} / left / yes
| smallimage = none / [[File:Some image.svg|30px]]
| smallimageright = none / [[File:Some image.svg|30px]]
| smalltext = 小尺寸消息文本
}}
Demospace
demospace 参数用于测试和演示,可强制指定命名空间。例如 demospace=main 强制显示条目样式。如需固定消息框样式,应直接使用对应的专用模板。
参见