(({text))} |
此Template被引用於約59,000個頁面。 為了避免造成大規模的影響,所有對此Template的編輯應先於沙盒、測試樣例或您的沙盒上測試。 測試後無誤的版本可以一次性地加入此Template中,但是修改前請務必於討論頁發起討論。 模板引用數量會自動更新。 |
信息框元模板 | |
---|---|
模板 | 背景 |
((Ambox)) | 條目 |
((Cmbox)) | 分類 |
((Imbox)) | 圖片 |
((Tmbox)) | 討論 |
((Fmbox)) | 頁腳/標題 |
((Ombox)) | 其他頁面 |
((Mbox)) | 自動偵測 |
((Asbox)) | 小作品 |
((Dmbox)) | 消歧義 |
此為 ((dmbox)) 或 消歧義頁腳訊息框 元模板。
本模板用以建立消歧義及設置索引條目訊息框,像是 ((disambig)) 和 ((shipindex))。
本模板運作方式類似 ((ambox)) 且大部分使用了相同的參數。主要差異在於本訊息框用在消歧義風格,並只有2種 "type" 設定選項。
简单用法示例:
((dmbox | text = Some text.))
Some text. |
((dmbox | type = setindex | text = Some text.))
Some text. |
复杂用法示例:
((dmbox | type = setindex | image = ((nowrap| [[File:Schooner.svg|30px]] [[File:List gray.svg|30px]] )) | textstyle = color: red; font-weight: bold; font-style: normal; | text = The message body text. ))
The message body text. |
其他一些参数组合:
No type and no image given (default) |
No type and image=none – No image is used and the text uses the whole message box area. |
type = setindex imageright = [[File:Schooner.svg|33px]] |
This article includes a list of ships with the same or similar names. If an internal link for a specific ship referred you to this page, you may wish to change the link to point directly to the intended ship article, if one exists. |
所有的参数清单:
((dmbox | type = disambig / setindex | image = none / [[File:Some image.svg|40px]] | imageright = [[File:Some image.svg|40px]] | style = CSS values | textstyle = CSS values | text = The message body text. ))
type
category
image
image = [[File:Schooner.svg|30px]]
imageright
imageright = [[File:Nuvola apps bookcase.png|40px]]
style
" "
but with the ending semicolons ;
. For example:
style = margin-bottom: 0.2em;
textstyle
textstyle = text-align: center;
text
该模板当前使用硬编码的样式和类名称。以后,它将仅使用CSS类,使皮肤更容易使用。 (与此同时,可以使用“ !important </ code>”关键字对它进行外观设置。)
如果需要在text参数中使用特殊字符,则需要像这样转义它们:
((dmbox
| text = <div>
Equal sign = and a start and end brace { } work fine as they are.
But here is a pipe ((!)) and two end braces )).
And now a pipe and end braces |)).
</div>
))
Equal sign = and a start and end brace { } work fine as they are.
But here is a pipe | and two end braces )).
And now a pipe and end braces |)).
在内部,此元模板使用HTML标记而不是表代码的Wiki标记。这是我们制作元模板的常用方法,因为Wiki标记有几个缺点。例如,它使在参数中使用解析器函数和特殊字符变得更加困难。
有关更多技术细节,请参见 讨论页面。由于此模板的工作原理几乎与(( ambox)),(( tmbox)),(( imbox)),(( cmbox))和(( ombox))的讨论页一样,相关页面也可能包含更多详细信息。
參見
在訊息框(mbox)家族中的元模板:
((ambox))
:用于条目訊息框
((tmbox))
:用于讨论页訊息框
((imbox))
:用于图像页訊息框
((cmbox))
:用于分类訊息框
((ombox))
:用于其他页面訊息框
((mbox))
:有名字空间探测功能。某些消息框会用在几类页面并因此需要依据所用在的页面来改变风格,这种情况下的消息框可以用此元模板。
有相近关系的元模板:
其他页面:
- Wikipedia:消歧義 – Also has a section explaining set index articles.
- Wikipedia:WikiProject Disambiguation
- MediaWiki:Disambiguationspage – Should list all disambiguation message boxes, so that some automatic tools can know what pages are disambiguation pages. Now also has a separate list with all set index message boxes, so some tools can know what pages are set index articles.
上述文档嵌入自Template:Dmbox/doc。 (编辑 | 历史) 编者可以在本模板的沙盒 (创建 | 镜像)和测试样例 (创建)页面进行实验。 请在/doc子页面中添加分类。本模板的子页面。 |