Template:Broader/doc:修订间差异
外观
删除的内容 添加的内容
拉取适配 zhwiki 模板文档(去简繁) |
删除互助客栈提示句 |
||
| (未显示同一用户的4个中间版本) | |||
| 第2行: | 第2行: | ||
{{Lua|Module:Broader}} |
{{Lua|Module:Broader}} |
||
本模板用于明确标示"概述性条目"(summary style)。效果如下: |
|||
This template is used to make summary style explicit. It looks like this: |
|||
{{Broader| |
{{Broader|方剂学}} |
||
该模板应当 |
该模板应当在有关于当前叙述主题的更广泛条目时使用,但不是主条目(应用 {{tl|Main}})、更窄的主题(应用 {{tl|Further}}),或同一层面上的关注(应用 {{tl|See also}})。 |
||
== |
== 用法 == |
||
; |
; 基本用法:{{tlc|Broader|''方剂学''}} |
||
; |
; 带主题:{{tlc|Broader|''方剂学''|topic{{=}}''主题''}} |
||
; |
; 多个目标页面:{{tlc|Broader|''方剂学1''|''方剂学2''|''方剂学3''|topic{{=}}''主题''}} |
||
; |
; 全部参数:{{tlc|Broader|''方剂学''|topic{{=}}''主题''|selfref{{=}}''yes''|category{{=}}''no''}} |
||
== |
== 参数 == |
||
本模板接受以下参数: |
|||
This template accepts the following parameters: |
|||
* <code>1</code> – 要链接的页面(必填)。分类和文件会自动使用[[Help:冒号技法|冒号技法]]转义,指向章节的链接会自动格式化为 ''页面 § 章节'',而非 MediaWiki 默认的 ''页面#章节''。 |
|||
* <code>1</code> - the page to link to (required). Categories and files are automatically escaped with the [[Help:Colon trick|colon trick]], and links to sections are automatically formatted as ''page § section'', rather than the MediaWiki default of ''page#section''. |
|||
* <code>2</code>(及更大数字)– 其他要链接的页面。与第一个参数一样自动格式化。 |
|||
* <code>2</code> (and greater numbers) - any additional pages to link to. These links are also automatically formatted as with the first parameter. |
|||
* <code>topic</code> – 主题名称。如未指定,默认使用"本主题"。 |
|||
* <code>topic</code> - the name of the topic. If this is not specified, the text "this topic" is used. |
|||
* <code>selfref</code> |
* <code>selfref</code> – 若设为"yes"、"y"、"true"或"1",添加 CSS 类"selfref"。用于表示对维基百科的自我提及。参见 [[Template:Selfref]]。 |
||
* <code>category</code> |
* <code>category</code> – 若设为"no"、"n"、"false"或"0",抑制错误跟踪分类([[:Category:有错误的顶注模板]])。仅在省略第一个位置参数(要链接的页面)时有效。 |
||
== |
== 示例 == |
||
* {{tlc|Broader| |
* {{tlc|Broader|方剂学}} → {{Broader|方剂学}} |
||
* {{tlc|Broader| |
* {{tlc|Broader|方剂学|topic{{=}}中药学}} → {{Broader|方剂学|topic=中药学}} |
||
== |
== 错误 == |
||
若未提供页面名称,模板将输出以下信息: |
|||
If no page name is supplied, the template will output the following message: |
|||
* {{Broader|category=no}} |
* {{Broader|category=no}} |
||
若看到此错误信息,可能是以下四种原因之一: |
|||
If you see this error message, it is for one of four reasons: |
|||
# |
# 未指定任何参数(模板代码为 <code><nowiki>{{Broader}}</nowiki></code>)。请改用 <code><nowiki>{{Broader|</nowiki>''页面''<nowiki>}}</nowiki></code>。 |
||
# |
# 指定了部分参数,但未包含页面名称。例如模板代码 <code><nowiki>{{Broader|selfref=yes}}</nowiki></code> 会产生此错误。请改用(例如)<code><nowiki>{{Broader|</nowiki>''页面''<nowiki>|selfref=yes}}</nowiki></code>。 |
||
# |
# 指定了页面名称,但包含等号("=")。等号在模板代码中有特殊含义,因此不能用于未指定参数名的模板参数中。例如模板代码 <code><nowiki>{{Broader|2+2=4}}</nowiki></code> 会产生此错误。可通过在页面名称前加 <code>1=</code> 显式指定参数名(如 <code><nowiki>{{Broader|1=2+2=4}}</nowiki></code>),或用 [[Template:=|双花括号包裹等号]](如 <code><nowiki>{{Broader|2+2{{=}}4}}</nowiki></code>)来避免等号被解释为参数名分隔符。 |
||
包含此错误信息的页面会归入 [[:Category:有错误的顶注模板]]。 |
|||
If you see this error message and are unsure of what to do, please post a message on [[WP:HD|the help desk]], and someone should be able to help you. |
|||
| ⚫ | |||
Pages that contain this error message are tracked in [[:Category:Hatnote templates with errors]]. |
|||
| ⚫ | |||
| ⚫ | |||
| ⚫ | |||
{{Hatnote templates}} |
{{Hatnote templates}} |
||
{{Collapse top| |
{{Collapse top|用于可视化编辑器等工具的模板数据文档}} |
||
{{TemplateData header|noheader=1}} |
{{TemplateData header|noheader=1}} |
||
<templatedata> |
<templatedata> |
||
{ |
{ |
||
"description": "此模板用于向读者显示与特定主题相关的更广泛内容的条目位置。通常放在章节或方剂学的顶部。", |
|||
"description": "This template is used to show readers where to find broader coverage related to a particular topic. It is usually placed at the top of a section or article.", |
|||
"params": { |
"params": { |
||
"1": { |
"1": { |
||
"label": " |
"label": "方剂学", |
||
"description": " |
"description": "要链接的方剂学名称", |
||
"type": "string", |
"type": "string", |
||
"required": true |
"required": true |
||
}, |
}, |
||
"2": { |
"2": { |
||
"label": " |
"label": "方剂学 2", |
||
"description": " |
"description": "要链接的第二个方剂学", |
||
"type": "string", |
"type": "string", |
||
"required": false |
"required": false |
||
}, |
}, |
||
"3": { |
"3": { |
||
"label": " |
"label": "方剂学 3", |
||
"description": " |
"description": "要链接的第三个方剂学", |
||
"type": "string", |
"type": "string", |
||
"required": false |
"required": false |
||
}, |
}, |
||
"4": { |
"4": { |
||
"label": " |
"label": "方剂学 4", |
||
"description": " |
"description": "要链接的第四个方剂学", |
||
"type": "string", |
|||
"required": false |
|||
}, |
|||
"5": { |
|||
"label": "方剂学 5", |
|||
"description": "要链接的第五个方剂学", |
|||
"type": "string", |
"type": "string", |
||
"required": false |
"required": false |
||
}, |
}, |
||
"topic": { |
"topic": { |
||
"label": " |
"label": "主题", |
||
"description": "主题名称", |
|||
"description": "A brief description of the topic related to which a broader coverage will be provided. If left blank, the template will read 'For broader coverage related to this topic...'", |
|||
"type": "string", |
"type": "string", |
||
"required": false |
"required": false |
||
}, |
}, |
||
"selfref": { |
"selfref": { |
||
" |
"label": "自我引用", |
||
" |
"description": "设为 yes 以添加 selfref CSS 类", |
||
"type": "boolean", |
|||
"description": "Set to \"yes\" if the hatnote text is a self-reference to Wikipedia that would not make sense on mirrors or forks of the Wikipedia site. (E.g. \"For the Wikipedia Sandbox, see [[WP:SAND]]\".)" |
|||
"required": false |
|||
}, |
}, |
||
"category": { |
"category": { |
||
"label": " |
"label": "分类", |
||
"description": "设为 no 以抑制错误跟踪分类", |
|||
"description": "Set to \"no\", \"n\", \"false\", or \"0\" to suppresses the error tracking category (Category:Hatnote templates with errors). This only has an effect if the hatnote text is omitted." |
|||
"type": "boolean", |
|||
"required": false |
|||
} |
} |
||
} |
} |
||
| 第96行: | 第103行: | ||
</templatedata> |
</templatedata> |
||
{{Collapse bottom}} |
{{Collapse bottom}} |
||
<includeonly>{{Sandbox other|| |
|||
<!-- Categories go here and interwikis go in Wikidata. --> |
|||
[[Category:顶注模板]] |
|||
}}</includeonly> |
|||
2026年8月1日 (六) 11:57的最新版本
| 此页面是Template:Broader的文档子页面。 此页面可能包含了使用说明、分类和其他内容,这些内容不属于原始Template页面。 |
| 此模板基于以下Lua语言模块编写: |
本模板用于明确标示"概述性条目"(summary style)。效果如下:
该模板应当在有关于当前叙述主题的更广泛条目时使用,但不是主条目(应用 {{Main}})、更窄的主题(应用 {{Further}}),或同一层面上的关注(应用 {{See also}})。
用法
- 基本用法:
{{Broader|方剂学}} - 带主题:
{{Broader|方剂学|topic=主题}} - 多个目标页面:
{{Broader|方剂学1|方剂学2|方剂学3|topic=主题}} - 全部参数:
{{Broader|方剂学|topic=主题|selfref=yes|category=no}}
参数
本模板接受以下参数:
1– 要链接的页面(必填)。分类和文件会自动使用冒号技法转义,指向章节的链接会自动格式化为 页面 § 章节,而非 MediaWiki 默认的 页面#章节。2(及更大数字)– 其他要链接的页面。与第一个参数一样自动格式化。topic– 主题名称。如未指定,默认使用"本主题"。selfref– 若设为"yes"、"y"、"true"或"1",添加 CSS 类"selfref"。用于表示对维基百科的自我提及。参见 Template:Selfref。category– 若设为"no"、"n"、"false"或"0",抑制错误跟踪分类(Category:有错误的顶注模板)。仅在省略第一个位置参数(要链接的页面)时有效。
示例
{{Broader|方剂学}}→{{Broader|方剂学|topic=中药学}}→
错误
若未提供页面名称,模板将输出以下信息:
- 错误:no page name specified(帮助)。
若看到此错误信息,可能是以下四种原因之一:
- 未指定任何参数(模板代码为
{{Broader}})。请改用{{Broader|页面}}。 - 指定了部分参数,但未包含页面名称。例如模板代码
{{Broader|selfref=yes}}会产生此错误。请改用(例如){{Broader|页面|selfref=yes}}。 - 指定了页面名称,但包含等号("=")。等号在模板代码中有特殊含义,因此不能用于未指定参数名的模板参数中。例如模板代码
{{Broader|2+2=4}}会产生此错误。可通过在页面名称前加1=显式指定参数名(如{{Broader|1=2+2=4}}),或用 双花括号包裹等号(如{{Broader|2+2{{=}}4}})来避免等号被解释为参数名分隔符。
包含此错误信息的页面会归入 Category:有错误的顶注模板。
参见
- {{Further}}
用于可视化编辑器等工具的模板数据文档
| |||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Broader模板数据 此模板用于向读者显示与特定主题相关的更广泛内容的条目位置。通常放在章节或方剂学的顶部。
| |||||||||||||||||||||||||||||||||||||||||||||