模板: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}}— 自動檢測命名空間