模板:TemplateData header:修订间差异
小 已保护“Template:TemplateData header”:高風險模板:775引用([编辑=仅允许自动确认用户](无限期)[移动=仅允许自动确认用户](无限期)) |
小 导入1个版本 |
||
| (未显示2个用户的2个中间版本) | |||
| 第1行: | 第1行: | ||
<div class="templatedata-header">{{#if:{{{noheader|}}}| | | <div class="templatedata-header">{{#if:{{{noheader|}}}|<!-- | ||
noheader: | |||
-->{{Template parameter usage|based=y}}|<!-- | |||
+header: | |||
-->This is the {{#if:{{{nolink|}}}|<!-- | |||
+header, nolink TD | |||
-->TemplateData|<!-- | |||
+header, +link [[TD]]; DEFAULT: | |||
-->[[Wikipedia:TemplateData|TemplateData]]}}<!-- | |||
e.o. #if:nolink; DEFAULT: | |||
--> for this template used by [[mw:Extension:TemplateWizard|TemplateWizard]], [[Wikipedia:VisualEditor|VisualEditor]] and other tools. {{Template parameter usage|based=y}}<!-- | |||
e.o. #if:noheader | |||
-->}} | |||
'''{{{1|{{BASEPAGENAME}}}}} | '''TemplateData for {{{1|{{BASEPAGENAME}}}}}''' | ||
</div><includeonly>{{# | </div><includeonly><!-- | ||
[[Category: | |||
}}</includeonly><noinclude> | check parameters | ||
{{Documentation}} | -->{{#invoke:Check for unknown parameters|check | ||
</noinclude> | |unknown={{template other|1=[[Category:Pages using TemplateData header with unknown parameters|_VALUE_]]}} | ||
|template=Template:TemplateData header | |||
|1 |nolink |noheader | |||
|preview=<div class="error" style="font-weight:normal">Unknown parameter '_VALUE_' in [[Template:TemplateData header]].</div> | |||
}}<!-- | |||
-->{{template other|{{sandbox other|| | |||
[[Category:Templates using TemplateData]] | |||
}}}}</includeonly><!-- | |||
--><noinclude>{{Documentation}}</noinclude> | |||
2022年10月23日 (日) 11:28的最新版本
TemplateData for TemplateData header
<templatestyles src="Module:Documentation/styles.css"></templatestyles>
| 文件:Lua-logo-nolabel.svg | 此模板使用Lua语言: |
The {{TemplateData header}} template inserts a brief header for the template data section, and adds the page to Category:Templates using TemplateData.
Usage
==TemplateData==
{{TemplateData header}}
<templatedata>{
...
}</templatedata>
Note: Section headers of ==Parameters== or ==Usage== may also be used.
Use {{TemplateData header|Template name}} to display a name for the template other than the default, which is {{BASEPAGENAME}}. Do not add namespace Template:
- This is the TemplateData for this template used by TemplateWizard, VisualEditor and other tools. Click here to see a monthly parameter usage report for this template based on this TemplateData.
TemplateData for Template name
Use {{TemplateData header|nolink=1}} to omit the wikilink from the word "TemplateData" in the header text, for instances where it is already linked outside this template.
- This is the TemplateData for this template used by TemplateWizard, VisualEditor and other tools. Click here to see a monthly parameter usage report for this template based on this TemplateData.
TemplateData for TemplateData header
Use {{TemplateData header|noheader=1}} to omit the first sentence of the header text.
- Click here to see a monthly parameter usage report for this template based on this TemplateData.
TemplateData for TemplateData header
Example
- Using a collapse box for
[[Template:User]]:
TemplateData for TemplateData header
{{TemplateData header/sandbox}}
Error: expandTemplate: template "TemplateData header/sandbox" does not exist
Parameters
TemplateData for TemplateData header
Inserts a brief header for the template data section. Adds the page to [[Category:Templates using TemplateData]]
| 参数 | 描述 | 类型 | 状态 | |
|---|---|---|---|---|
| Template name | 1 | Used to display a name for the template other than the default, which is {{BASEPAGENAME}}. | 字符串 | 可选 |
| No link | nolink | Assigning any value to this parameter will omit cause the template to omit the wikilink from the word "TemplateData" in the header text, for instances where it is already linked outside this template. | 字符串 | 可选 |
| No header | noheader | Assigning any value to this parameter will cause the template to omit the first sentence of the header text. | 字符串 | 可选 |