模板:Tmbox/doc
外观
| 此页面是Template:Tmbox的文档子页面。 此页面可能包含了使用说明、分类和其他内容,这些内容不属于原始Template页面。 |
| 此模板使用Lua语言: |
| 本模板使用以下模板样式: |
{{Tmbox}}(Talk page message box,讨论页消息框)是用于讨论页面的消息框元模板。它提供多种颜色和预设图片,与 {{Ambox}} 参数基本相同。
常用参数
| 参数 | 说明 |
|---|---|
type |
speedy / delete / content / style / notice / move / protection
|
image |
自定义图标(none 则不显示图片)
|
imageright |
右侧图片 |
style |
整个信息框的 CSS 样式 |
textstyle |
文字单元格的 CSS 样式 |
text |
消息正文 |
small |
yes 时显示为小型右浮框
|
smallimage |
小型模式下的左侧图片 |
smallimageright |
小型模式下的右侧图片 |
smalltext |
小型模式下的文字 |
type 类型建议
speedy— 仅用于快速删除模板delete— 仅用于与正在进行的删除讨论相关的模板content— 橙色边框,用于更重要的警告(临时用途)style— 黄色边框,用于较低重要度警告(临时用途)notice— 灰色边框,用于大部分讨论页信息框(通用类型)move— 用于移动、合并、页面相关消息框protection— 用于页面保护模板
type 演示
| type=speedy 快速删除 |
| type=delete 删除 |
| type=content 大部分警告和提醒 |
| type=style 较小警告 |
| type=notice 各类通知和信息 |
| type=move 合并、拆分和重命名提议 |
| type=protection 页面保护 |
小尺寸模式
{{Tmbox|type=notice|small=yes|text=small=yes — 小型右浮消息框}}
| small=yes — 小型右浮消息框 |
参数说明
{{tmbox
| 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|}}} / yes
| smallimage = none / [[File:Some image.svg|30px]]
| smallimageright = none / [[File:Some image.svg|30px]]
| smalltext = 简短文字
}}
技术细节
如需在 text 参数中使用特殊字符:
{{tmbox
| text =
等号 = 与前后大括号 { } 可以正常使用。
但管道符 {{!}} 与两个后大括号 <nowiki>}}</nowiki> 不能直接使用。
同时使用需加 nowiki 标记 <nowiki>|}}</nowiki>。
}}
此模板使用 tmbox CSS 类确定显示风格,可更换皮肤。
参见
{{Ambox}}— 条目消息框{{Imbox}}— 文件页消息框{{Cmbox}}— 分类消息框{{Ombox}}— 其他页面消息框{{Fmbox}}— 页眉和页脚消息框{{Mbox}}— 自动检测命名空间