模板:Cmbox
| 此模板使用Lua語言: |
| 本模板使用以下模板樣式: |
{{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 表格標記,這是元模板常見做法。