跳转到内容

Template:Category see also if exists/doc:修订间差异

勤求古训,博采众方
删除的内容 添加的内容
doc 转中文简体
取消示例段落
 
(未显示2个用户的3个中间版本)
第1行: 第1行:
{{Documentation subpage}}<!-- 在本行下编辑模板说明 -->
{{Documentation subpage}}
<!-- 在本行下编辑模板说明 -->
{{lua|Module:See also if exists}}
{{lua|Module:Category see also if exists}}
{{high use|2611}}{{NODOC}}


此模板用于生成"参见"分类的顶注,仅列出'''实际存在'''的分类页面。
{{Category hatnote templates}}


== 用法 ==
<includeonly>{{sandbox other||
<pre>{{Category see also if exists|分类1|分类2|...}}</pre>


== 参数 ==
; 位置参数(可多个)
: 分类名称。可带或不带 <code>Category:</code> 前缀。

== 工作原理 ==
调用 [[Module:Category see also if exists]],遍历所有参数,用 <code>mw.title.exists</code> 检查分类是否存在,仅输出存在的分类。

== 参见 ==
* [[Module:Category see also if exists]]
{{Hatnote templates}}

<includeonly>{{sandbox other||
[[Category:顶注模板]]
}}</includeonly>
}}</includeonly>

2026年8月1日 (六) 13:05的最新版本

此模板用于生成"参见"分类的顶注,仅列出实际存在的分类页面。

用法

{{Category see also if exists|分类1|分类2|...}}

参数

位置参数(可多个)
分类名称。可带或不带 Category: 前缀。

工作原理

调用 Module:Category see also if exists,遍历所有参数,用 mw.title.exists 检查分类是否存在,仅输出存在的分类。

参见