Template:Broader/doc:修订间差异

删除的内容 添加的内容
doc 注释中文化
删除互助客栈提示句
 
(未显示同一用户的2个中间版本)
第2行:
{{Lua|Module:Broader}}
 
本模板用于明确标示"概述性条目"(summary style)。效果如下:
This template is used to make summary style explicit. It looks like this:
 
{{Broader|方剂学}}
 
该模板应当于有有关于当前叙述主题的更广泛条目时使用,但不是主条目 ( {{tl|Main}}),一个)、更窄的主题 (用 {{tl|Further}}),),或同一层面上的关注(应 {{tl|See also}})。
 
== Usage用法 ==
 
; Basic usage: 基本用法:{{tlc|Broader|''方剂学''}}
; With a topic: 带主题:{{tlc|Broader|''方剂学''|topic{{=}}''topic主题''}}
; With more than one target page: 多个目标页面:{{tlc|Broader|''方剂学1''|''方剂学2''|''方剂学3''|topic{{=}}''topic主题''}}
; All parameters: 全部参数:{{tlc|Broader|''方剂学''|topic{{=}}''topic主题''|selfref{{=}}''yes''|category{{=}}''no''}}
 
== Parameters参数 ==
 
本模板接受以下参数:
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> - if set to 若设为"yes", "y", "true" or "1", adds the,添加 CSS class "selfref". This is used to denote self-references to Wikipedia. See。用于表示对维基百科的自我提及。参见 [[Template:Selfref]] for more information.
* <code>category</code> - if set to 若设为"no", "n", "false", or "0", suppresses the error tracking category (,抑制错误跟踪分类([[:Category:Hatnote templates with errors有错误的顶注模板]]). This only has an effect if the first positional parameter (the page to link to) is omitted.)。仅在省略第一个位置参数(要链接的页面)时有效。
 
== Examples示例 ==
 
* {{tlc|Broader|方剂学}} &rarr; {{Broader|方剂学}}
* {{tlc|Broader|方剂学|topic{{=}}中药学}} &rarr; {{Broader|方剂学|topic=中药学}}
 
== Errors错误 ==
 
若未提供页面名称,模板将输出以下信息:
If no page name is supplied, the template will output the following message:
* {{Broader|category=no}}
 
若看到此错误信息,可能是以下四种原因之一:
If you see this error message, it is for one of four reasons:
# No parameters were specified (the template code was未指定任何参数(模板代码为 <code><nowiki>{{Broader}}</nowiki></code>). Please use)。请改用 <code><nowiki>{{Broader|</nowiki>''page页面''<nowiki>}}</nowiki></code> instead.
# Some parameters were specified, but the page name wasn't included. For example, the template text指定了部分参数,但未包含页面名称。例如模板代码 <code><nowiki>{{Broader|selfref=yes}}</nowiki></code> will produce this error. Please use (for example) 会产生此错误。请改用(例如)<code><nowiki>{{Broader|</nowiki>''page页面''<nowiki>|selfref=yes}}</nowiki></code> instead.
# The page name was specified, but it contains an equals sign (指定了页面名称,但包含等号("="). The equals sign has a special meaning in template code, and because of this it cannot be used in template parameters that do not specify a parameter name. For example, the template code)。等号在模板代码中有特殊含义,因此不能用于未指定参数名的模板参数中。例如模板代码 <code><nowiki>{{Broader|2+2=4}}</nowiki></code> will produce this error. To work around this, you can specify the parameter name explictly by using会产生此错误。可通过在页面名称前加 <code>1=</code> before the page name (like this:显式指定参数名(如 <code><nowiki>{{Broader|1=2+2=4}}</nowiki></code>) or you can disable the equals being interpreted as delimiting a parameter name by),或用 [[Template:=|surrounding the equals with double braces双花括号包裹等号]] (like this:(如 <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.
 
== See also参见 ==
Pages that contain this error message are tracked in [[:Category:Hatnote templates with errors]].
* {{tl|Further}}
 
== See also ==
*{{tl|Further}}
 
{{Hatnote templates}}
{{Collapse top|TemplateData documentation used by VisualEditor and other tools用于可视化编辑器等工具的模板数据文档}}
{{TemplateData header|noheader=1}}
<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 方剂学.",
"params": {
"1": {
"label": "方剂学",
"description": "The name of the 要链接的方剂学 that you want to link to名称",
"type": "string",
"required": true
第61行 ⟶ 第59行:
"2": {
"label": "方剂学 2",
"description": "The name of an additional 要链接的第二个方剂学 that you want to link to",
"type": "string",
"required": false
第67行 ⟶ 第65行:
"3": {
"label": "方剂学 3",
"description": "The name of an additional 要链接的第三个方剂学 that you want to link to",
"type": "string",
"required": false
第73行 ⟶ 第71行:
"4": {
"label": "方剂学 4",
"description": "The name of an additional 要链接的第四个方剂学 that you want to link to",
"type": "string",
"required": false
},
"5": {
"label": "方剂学 5",
"description": "要链接的第五个方剂学",
"type": "string",
"required": false
},
"topic": {
"label": "Topic主题",
"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",
"required": false
},
"selfref": {
"typelabel": "string/line自我引用",
"labeldescription": "Self设为 referenceyes 以添加 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": {
"label": "Category分类",
"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>
{{Collapse bottom}}
 
<includeonly>{{Sandbox other||
<!-- 分类加在此处,跨维基链接加入维基数据. -->
 
[[Category:顶注模板]]
}}</includeonly>