模板:Distinguish
外觀
(重新導向自Template:Not)
本模板用於在條目頂部顯示消歧義提示,支持多種模式靈活調用。
用法
[編輯原始碼]{{Distinguish
| mode = 模式名称
| 1 = 第一个条目名
| 2 = 第二个条目名(可选)
| 3 = 第三个条目名(可选)
| 4 = 第四个条目名(可选)
| not1 = 排除条目名1(仅 mode=is 时使用)
| not2 = 排除条目名2(仅 mode=is 时使用)
| not3 = 排除条目名3(仅 mode=is 时使用)
| not4 = 排除条目名4(仅 mode=is 时使用)
| type = 事物类型(仅 mode=is 时使用)
| other = 消歧义页面名(仅 mode=is 时使用)
| text = 自定义提示文本(可选,会覆盖默认生成的内容)
}}
參數說明
[編輯原始碼]- mode
- 顯示模式,可選值:
not、is、other。不填時默認為not。 - 1、2、3、4
- 用於列出消歧義目標條目名。在
mode=not時表示「主題不是這些」;在mode=other時僅1生效,表示消歧義頁面;在mode=is時1表示主題名稱。 - not1、not2、not3、not4
- 僅在
mode=is時使用,用於列出「主題不是」的排除條目,可指定最多 4 個。 - type
- 僅在
mode=is時使用,用於描述主題的類別,如「事物」「詞語」「公司」「電影」等。不填時默認為「事物」。 - other
- 僅在
mode=is時使用,指定「其它用法請見」的消歧義頁面名。 - text
- 完全自定義提示文本,填寫後將忽略上述所有參數生成的默認內容。
示例
[編輯原始碼]mode=not(默認)
[編輯原始碼]{{Distinguish|mode=not|1=虚舟实验室|2=虚舟号}}
效果:
mode=is(帶排除列表)
[編輯原始碼]{{Distinguish
| mode = is
| 1 = 虚舟
| type = 词语
| not1 = 虚舟实验室
| other = 虚舟 (消歧义)
}}
效果:
mode=is(無排除列表)
[編輯原始碼]{{Distinguish
| mode = is
| 1 = 虚舟
| type = 词语
| other = 虚舟 (消歧义)
}}
效果:
mode=other
[編輯原始碼]{{Distinguish|mode=other|1=虚舟 (消歧义)}}
效果:
使用 text 自定義
[編輯原始碼]{{Distinguish|text=本条目的主题是“虚舟”一词,关于其他含义请见 [[虚舟 (消歧义)]]。}}
效果:
注意事項
[編輯原始碼]- 本模板依賴
Template:If mobile實現移動端適配。如果站點沒有該模板,請刪除模板代碼中的部分。 - 建議在條目頂部、序言之前使用本模板。
- 消歧義頁面命名請遵循站點的命名規範,通常為「主条目名 (消歧义)」。
not1~not4僅在mode=is下生效,其他模式會被忽略。