Template:Distinguish/doc:修订间差异
外观
删除的内容 添加的内容
创建页面,内容为“{{Documentation subpage}} <!-- 请在下方编辑模板说明 --> 本模板用于在条目顶部显示消歧义提示,支持多种模式灵活调用。 == 用法 == <pre>{{模板名 | mode = 模式名称 | 1 = 第一个条目名 | 2 = 第二个条目名(可选) | 3 = 第三个条目名(可选) | 4 = 第四个条目名(可选) | type = 事物类型(仅 mode=is 时使用) | other = 消歧义页面名(仅 mode…” |
无编辑摘要 |
||
| 第6行: | 第6行: | ||
== 用法 == |
== 用法 == |
||
<pre>{{ |
<pre>{{Distinguish |
||
| mode = 模式名称 |
| mode = 模式名称 |
||
| 1 = 第一个条目名 |
| 1 = 第一个条目名 |
||
| 第33行: | 第33行: | ||
=== mode=not(默认) === |
=== mode=not(默认) === |
||
<pre>{{ |
<pre>{{Distinguish|mode=not|1=Apple Inc|2=iPhone}}</pre> |
||
效果: |
效果: |
||
{{ |
{{Distinguish|mode=not|1=Apple Inc|2=iPhone}} |
||
=== mode=is === |
=== mode=is === |
||
<pre>{{ |
<pre>{{Distinguish|mode=is|1=苹果|type=水果|other=苹果 (消歧义)}}</pre> |
||
效果: |
效果: |
||
{{ |
{{Distinguish|mode=is|1=苹果|type=水果|other=苹果 (消歧义)}} |
||
=== mode=other === |
=== mode=other === |
||
<pre>{{ |
<pre>{{Distinguish|mode=other|1=苹果 (消歧义)}}</pre> |
||
效果: |
效果: |
||
{{ |
{{Distinguish|mode=other|1=苹果 (消歧义)}} |
||
=== 使用 text 自定义 === |
=== 使用 text 自定义 === |
||
<pre>{{ |
<pre>{{Distinguish|text=本条目的主题是苹果,关于其他含义请见 [[苹果 (消歧义)]]。}}</pre> |
||
效果: |
效果: |
||
{{ |
{{Distinguish|text=本条目的主题是苹果,关于其他含义请见 [[苹果 (消歧义)]]。}} |
||
== 注意事项 == |
== 注意事项 == |
||
| 第61行: | 第61行: | ||
* [[Template:Other uses]] |
* [[Template:Other uses]] |
||
* [[Template:Distinguish]] |
* [[Template:Distinguish]](本模板) |
||
* [[Template:For]] |
* [[Template:For]] |
||
2026年8月26日 (三) 11:10的版本
此页面是Template:Distinguish的模板文档。
此页面可能包含了模板的使用说明、分类和其他内容。
此页面可能包含了模板的使用说明、分类和其他内容。
本模板用于在条目顶部显示消歧义提示,支持多种模式灵活调用。
用法
{{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=苹果 (消歧义)}}
效果:
使用 text 自定义
{{Distinguish|text=本条目的主题是苹果,关于其他含义请见 [[苹果 (消歧义)]]。}}
效果:
注意事项
- 本模板依赖
Template:If mobile实现移动端适配。如果站点没有该模板,请删除代码中的部分。 - 建议在条目顶部、序言之前使用本模板。
- 消歧义页面命名请遵循站点的命名规范,通常为“主条目名 (消歧义)”。
参见