跳转到内容

Template:Distinguish/doc:修订间差异

轻之舟百科,让知识轻装启航
删除的内容 添加的内容
云云​(留言 | 贡献)
无编辑摘要
云云​(留言 | 贡献)
无编辑摘要
第34行: 第34行:
=== mode=not(默认) ===
=== mode=not(默认) ===
<pre>{{Distinguish|mode=not|1=Apple Inc|2=iPhone}}</pre>
<pre>{{Distinguish|mode=not|1=Apple Inc|2=iPhone}}</pre>

效果:
{{Distinguish|mode=not|1=Apple Inc|2=iPhone}}


=== mode=is ===
=== mode=is ===
<pre>{{Distinguish|mode=is|1=苹果|type=水果|other=苹果 (消歧义)}}</pre>
<pre>{{Distinguish|mode=is|1=苹果|type=水果|other=苹果 (消歧义)}}</pre>

效果:
{{Distinguish|mode=is|1=苹果|type=水果|other=苹果 (消歧义)}}


=== mode=other ===
=== mode=other ===
<pre>{{Distinguish|mode=other|1=苹果 (消歧义)}}</pre>
<pre>{{Distinguish|mode=other|1=苹果 (消歧义)}}</pre>
效果:
{{Distinguish|mode=other|1=苹果 (消歧义)}}



=== 使用 text 自定义 ===

<pre>{{Distinguish|text=本条目的主题是苹果,关于其他含义请见 [[苹果 (消歧义)]]。}}</pre>
效果:
{{Distinguish|text=本条目的主题是苹果,关于其他含义请见 [[苹果 (消歧义)]]。}}


== 注意事项 ==
== 注意事项 ==
第60行: 第54行:
== 参见 ==
== 参见 ==


* [[Template:Other uses]]
* [[Template:Distinguish]](本模板)
* [[Template:Distinguish]](本模板)
* [[Template:For]]
* [[Template:For]]

2026年8月26日 (三) 11:11的版本

本模板用于在条目顶部显示消歧义提示,支持多种模式灵活调用。

用法

{{Distinguish
| mode    = 模式名称
| 1       = 第一个条目名
| 2       = 第二个条目名(可选)
| 3       = 第三个条目名(可选)
| 4       = 第四个条目名(可选)
| type    = 事物类型(仅 mode=is 时使用)
| other   = 消歧义页面名(仅 mode=is 时使用)
| text    = 自定义提示文本(可选,会覆盖默认生成的内容)
}}

参数说明

mode
显示模式,可选值:not、is、other。不填时默认为 not。
1、2、3、4
用于列出消歧义目标条目名。在 mode=not 时表示“主题不是这些”;在 mode=other 时仅 1 生效,表示消歧义页面。
type
仅在 mode=is 时使用,用于描述主题的类别,如“水果”“公司”“电影”等。不填时默认为“事物”。
other
仅在 mode=is 时使用,指定“其它用法请见”的消歧义页面名。
text
完全自定义提示文本,填写后将忽略上述所有参数生成的默认内容。

示例

mode=not(默认)

{{Distinguish|mode=not|1=Apple Inc|2=iPhone}}


mode=is

{{Distinguish|mode=is|1=苹果|type=水果|other=苹果 (消歧义)}}


mode=other

{{Distinguish|mode=other|1=苹果 (消歧义)}}



注意事项

  • 本模板依赖 Template:If mobile 实现移动端适配。如果站点没有该模板,请删除代码中的    部分。
  • 建议在条目顶部、序言之前使用本模板。
  • 消歧义页面命名请遵循站点的命名规范,通常为“主条目名 (消歧义)”。

参见