巴子是什么意思| 肝阳虚吃什么中成药| 勃是什么意思| 上海最高楼叫什么大厦有多少米高| 红豆与赤小豆有什么区别| ph值小于7是什么意思| 梦见白蛇是什么预兆| 一什么故事| 舌头上火是什么原因| 最快的速度是什么| 壁虎为什么是五毒之一| 痣发痒是什么原因| 什么牌子的充电宝好| 吃什么助睡眠| mlb中文叫什么| 沐雨栉风是什么生肖| 孩子不好好吃饭是什么原因| 冬菜是什么菜| 乳腺结节3类什么意思| 什么食物对眼睛视力好| 伤官是什么意思| 颈椎病有什么特效药| 血浓稠是什么原因引起的| 竖中指代表什么意思| 1月29日什么星座| 什么小吃最火爆最赚钱| 广角是什么| 芒果不能和什么水果一起吃| 阴道炎什么症状| 生理性是什么意思| 蛋白尿是什么症状| 什么言什么语| 灵芝对身体有什么好处| 早上7点多是什么时辰| 小苏打可以用什么代替| 山芋是什么| 尿常规能查出什么病| 生化八项是检查什么| 孕妇梦见下雨是什么意思| eason是什么意思| 何曾是什么意思| 右边肚子疼是什么原因| 为什么突然头晕| 知乎是干什么的| 属相是什么意思| 解暑喝什么| 白萝卜煮水喝有什么功效和作用| 是否是什么意思| 为什么小鸟站在电线上不会触电| 离宅是什么意思| 外痔用什么药| 多囊卵巢有什么症状表现| 谷氨酰转肽酶是指什么| 晚上老咳嗽是什么原因| 声情并茂的意思是什么| 美容美体是干什么的| 关节发黑是什么原因| 夜里12点是什么时辰| 直捣黄龙是什么意思| 不明觉厉是什么意思| 伸舌头锻炼有什么好处| 又双叒叕念什么啥意思| 半边脸疼是什么原因| 血糖高的人吃什么水果| 熬粥用什么锅好| 桦树茸泡水喝有什么功效| 高抬贵手是什么意思| 生动是什么意思| 全麦面包是什么意思| 51岁属什么生肖| 农历6月是什么星座| 恶寒发热是什么意思| 产后屁多是什么原因| sod是什么| 1969年什么时候退休| 二月九号是什么星座| 为什么兔子的眼睛是红色的| 喜闻乐见什么意思| 子宫直肠窝积液是什么意思| 尿泡沫多吃什么药| 两岁宝宝拉肚子吃什么药| 非萎缩性胃炎吃什么药效果好| 1902年属什么生肖| 肾结石有什么影响| 宫腔回声不均匀什么原因| 男羊配什么属相最好| 尿检4个加号什么意思| 男生纹身纹什么好| 耳闷耳堵是什么原因引起的| 鸡胗是鸡的什么部位| 每天拉肚子是什么原因引起的| 左后背疼是什么原因| 小狗肚子里有虫子吃什么药| living是什么意思| 什么是团队| 烂舌头是什么原因| 保重适合对什么人说| 泌尿系统感染吃什么消炎药| 卵巢畸胎瘤是什么病| 寄生虫长什么样| 精忠报国是什么生肖| 载脂蛋白b偏高是什么意思| champion什么意思| 虎虎生风是什么意思| 类似蜈蚣的虫子叫什么| 心肌缺血做什么检查能查出来| 备孕检查什么项目| 皮卡丘站起来变成了什么| 刚拔完智齿可以吃什么| 神经衰弱吃什么好| 益生菌什么牌子最好| 筷子在古代叫什么| 强的松又叫什么| ecg是什么意思| hr是什么单位| smart什么牌子| 唐僧成了什么佛| 辣根是什么| 吃什么卵泡长得快又圆| 胸部正侧位片检查什么| 康熙的儿子叫什么| 月经推迟是什么原因| 巨蟹座的幸运色是什么颜色| 肚子左侧疼是什么原因| 正切是什么| 栉风沐雨是什么意思| 男人吃荔枝有什么好处| 胃窦炎是什么原因引起的| 生日蛋糕上写什么字比较有创意| 鼻子有痣代表什么| 眼皮跳什么预兆| 一什么虫子| 白细胞酯酶是什么意思| 多吃蔬菜对身体有什么好处| 血管瘤是什么原因引起的| 人为什么会觉得累| 老人经常便秘有什么好办法| 北京的市花是什么花| 5月23日是什么日子| 坐月子是什么意思| 三岁打什么疫苗| 什么水果可以解酒| 鼻子不通气吃什么药| 法院院长是什么级别| 胃炎吃什么| 为什么叫买东西不叫买南北| 外卖是什么意思| 失不出头念什么| 去脂肪粒最有效的药膏叫什么| adr是什么| 思源名字的寓意是什么| 什么是月子病| 查肝肾功能挂什么科| 小熊衣服叫什么牌子| 无人区是什么意思| 血糖高吃什么水果好| 什么的星星| 痞气是什么意思| 饿了手抖是什么原因| 娃儿发烧用什么方法退烧快| 桃子不能跟什么一起吃| 梦见自己剪头发是什么意思| 下嘴唇起泡是什么原因| 8月3日是什么日子| 钙化是什么意思啊| 副巡视员是什么级别| cta是什么检查| 女人身体发热预示什么| 卖是什么意思| 尿潜血1十是什么原因| 吃月饼是什么节日| 什么是假性银屑病| 什么叫阵雨| 四平八稳是什么意思| 住院医师是什么意思| 苦胆是什么| 杜康原是什么| 较前相仿是什么意思| mps是什么意思| 老是叹气是什么原因| belle什么意思| 吃什么对脑血管好| 哺乳期感冒吃什么药不影响哺乳| 牙膏洗脸有什么好处和坏处| 打太极拳有什么好处| 什么东西只进不出| 脾囊肿是什么原因引起的| 袁绍和袁术是什么关系| 豆干炒什么好吃| 头晕眼花吃什么药| 绿巨人是什么意思| nc是什么意思| 子宫肌瘤有什么症状| 鱼吐泡泡是什么原因| 回是什么生肖| 镇关西是什么意思| carrots是什么意思| 单脐动脉是什么意思| 干事是什么意思| 什么是痔疮早期图片| 黄色裤子配什么上衣| 月光族是什么意思啊| 豆绿色是什么颜色| 什么叫精神病| 胆结石是什么症状| 11月份是什么星座| 二十年婚姻是什么婚| 为什么会上火| 吃了小龙虾不能吃什么| 感冒吃什么水果好得快| 蛇鼠一窝是什么生肖| ao是什么意思| 蟑螂有什么危害| 耳钉什么材质的好| 老来得子是什么意思| 女人喝什么茶最好| 尿是绿色的是什么原因| 黄豆吃多了有什么坏处| 附属国是什么意思| 粉色裤子搭什么上衣| 嗓子痒咳嗽是什么原因| 早上喝牛奶有什么好处| 胃体息肉是什么意思| 血压低什么症状| 一什么骆驼| 梅毒通过什么途径传染| 蓓蕾是什么意思| 头七有什么规矩| 什么是外心| 心肌缺血吃什么药管用| 喝红牛有什么好处和坏处| 大姨妈发黑是什么原因| 粉荷花的花语是什么| 梦见爸爸去世预兆什么| 毒龙什么意思| 九月三日是什么日子| 红细胞是什么| 5是什么生肖| 看见老鼠有什么预兆| evisu是什么牌子| 胎盘低置状态是什么意思| 鼻炎是什么症状| 重庆有什么烟| 柠檬蜂蜜水有什么功效| 朱砂痣什么意思| 前庭功能检查是查什么| 吃什么补血小板| 清补凉是什么| 眼睛发炎吃什么消炎药| 皮质醇是什么意思| 支原体肺炎用什么药| 宝宝低烧是什么原因引起的| 来例假喝什么好| 苹果补充什么维生素| 咳嗽有痰吃什么药| 为什么会低血压| 化学专业学什么| 泌尿系统由什么组成| 什么的草叶| 短裙配什么鞋子好看| 脸发麻是什么原因| 苹果和什么一起榨汁好喝| 翠花是什么意思| 骨折吃什么钙片| 百度

医药专家:建立规范化、标准化癫痫病诊治体系

百度 最终,全场比赛结束,山东在主场以127-104大胜江苏,系列赛大比分3-0横扫对手,率先晋级半决赛,将对阵广厦与深圳的胜者。

Templates are a very powerful feature of MediaWiki, but can be confusing to new users and even experienced users can have difficulty making sense of the more complex ones. Templates should therefore be accompanied by documentation to improve usability.

Template documentation should explain what a template does and how to use it. It should be simple enough that a user without complete knowledge of the intricacies of template syntax—which includes many experienced contributors who focus their attention elsewhere—can use it correctly. This is especially true in the case of very widely used templates.

Editors should defer to official policies or guidelines when template documentation pages are inconsistent with established community standards and principles. Editors should also avoid "quoting" template documentation pages as though they are policy—including this how-to guide. Template documentation pages can be written without much—if any—debate, as opposed to Wikipedia policies that have been thoroughly vetted by the community (see WP:Local consensus for details).

What to include

Template documentation should cover:

  • The basic purpose of the template: what it does and if it is not immediately obvious, why it needs to be done. If there are other templates with similar names or purposes, it's a good idea to mention those, in order to reduce the chance of the wrong one being used. Include important limitations, such as the lack of {{Navbox visibility}} on the Mobile web site, if a template should only be used for certain countries or time periods, or other things that editors need to know before choosing to use the template.
  • The parameters of the template: whether they are numbered, named or optional, and if so, what the default values are and what effect they have. If a parameter can take only a limited set of values or is constrained in any way, for example, if it can only use "yes", "no", or a number, this should be clearly explained.
  • Usage examples: specify the exact wikitext that should be used and the result that it produces. The wikitext can be enclosed in a <code>...</code> container, to make it clear and easy to copy, like this. If the template can be used in several ways, with or without optional parameters, for example, provide a range of examples. A good way to do so is to transclude the template itself into the documentation a few times (i.e., use live examples), with different parameters each time and list the parameters used in each case. With {{demo}} this can be done without putting the template call twice in the wikitext.
  • TemplateData tags: See Wikipedia:TemplateData/Tutorial.
  • Related templates: if the template is one of a series of templates, include links to these – in particular, ensure that every template in the series is linked from each of the others, as this makes navigation easier. (A separate navigation template may be useful for this purpose, e.g., {{Protection templates}}).
  • Categories where applicable (InterWikimedia links should be listed at Wikidata – more information at Wikipedia:Wikidata). Like the documentation, categories must be listed within a <noinclude>...</noinclude> container on a template, or within <includeonly>{{Sandbox other||...}}</includeonly> tags if placed on a documentation page. Many template categories are available, see: Category:Wikipedia templates to browse through them.

The English Wikipedia is a source of templates for hundreds of other Wikipedias and sister projects. Often, templates are fully self-contained, so the process is easy: The contents are simply copied to a new template page at the other wiki, and everything works. However, on more complex templates, the template may invoke a module, transclude other templates, only work if paired with a separate template, or need particular CSS or JavaScript code to work. In these cases, it is helpful to include a brief list of templates or other code that this one requires, at the end of the documentation.

Where to place it

When viewing the rendered template page itself (as opposed to its wikicode), what is usually visible right under the title is the rendered template itself, followed by a separate section to display the template's rendered documentation, followed by the categories to which the template belongs. Categories and documentation of any sort on a template page (including TemplateData) should always be enclosed by noinclude tags, so that they do not show up when the template is used on another page.

The editable wikicode for the template's documentation is often placed on a separate subpage of the template itself, which is then transcluded at the end of the template page. This separates the often complex template code from the documentation, making the documentation easier to edit and reducing the number of accidental editing errors in the template code. It also allows templates to be protected where necessary, limiting editing access to important templates' code while allowing anyone to edit those templates' documentation. This method is sometimes referred to as the "template-doc page pattern".

How to create a documentation subpage

Put documentation in the template

You must put {{documentation}} when creating (publishing) a template. Then a documentation page is created with [view] [edit] [history] [purge] links. You can create and edit the template documentation clicking in this pane [edit] link.

Template documentation subpages using {{documentation}} are named and formatted using the following general pattern, for consistency.

Suppose your template is named Template:X. Edit the template and append the following at the end of the template code, or use {{subst:doc-code}}:

[--last line of your template code--]<noinclude>
{{Documentation}}
<!-- Add categories to the /doc subpage and interwikis in Wikidata, not here! -->
</noinclude>

This will transclude {{documentation}} at the bottom of the template page.

Important: Make sure the opening <noinclude> begins immediately after the last character of the template code or text and not on a new line, nor with any intervening spaces. Otherwise, extra space will be inserted below the template when it is used, which is usually not wanted.

If the template is already protected, ask an administrator to do this or request an edit by using an {{edit protected}} on the template's talk page. If documentation and categories already exist in a section, enclosed within a <noinclude>...</noinclude> container, move them into the documentation subpage (where they should be enclosed in <includeonly>...</includeonly>), as it is best not to have documentation split across two separate pages.

Automatic creation

Use [create] link at the bottom of the empty documentation box to automatically create a preloaded documentation subpage. Insert the documentation after the top line and categories under the appropriate comment line – leaving the comment in place, so that the layout is preserved when the page is edited in future. Related templates, policy page, projects, etc. can be linked to by adding a "See also" section. Save the subpage.

Manual creation

To create the documentation subpage manually, create a subpage with the name Template:X/doc. See the details at {{Documentation subpage}} or start the page by copy-pasting the following standard wikitext:

{{Documentation subpage}}
== Usage ==


<includeonly>{{Sandbox other||
<!-- Categories below this line -->

}}</includeonly>

The top line will display a message explaining the current page and a link to the template page. Save the subpage and follow instructions in § Use Template:Documentation.

With TemplateData

Instead of manually writing a lead graf and a usage table, the {{Format TemplateData}} template can do most of the job. Simply write your TemplateData in the table interface, and then wrap it into a template call like {{Format TemplateData|1=<templatedata>...</templatedata>}} at the top of the page.

Notes

You may wish to redirect the talk page of the /doc subpage to the talk page of the template itself. Then all talk relating to the template and its documentation will end up on the same talkpage. For example, redirect Template talk:X/doc to Template talk:X.

A documentation page can also be redirected to the /doc subpage of another template, if that covers the usage for both templates. In this case, clicking the links to view or edit the documentation will directly open the target of the redirect. If it is necessary to access the redirect itself (e.g. to remove the redirect and create a separate doc page), go to the template URL by clicking in the location bar at the top of your browser, and add /doc at the end.

Blank

To generate a blank template, which may then be copied from the documentation and pasted into another page, use:

{{subst:#tag:pre|{{subst:Parameters|code|base={{subst:BASEPAGENAME}}}}|style=overflow: auto;}}

Examples

To generate an instance of the template, populated with its own property names, use:

{{subst:Parameters|demo|base={{subst:BASEPAGENAME}}|_base=}}
  • To place the template itself into a category, add the [[Category:Category name]] code inside an <includeonly>...</includeonly> section on the doc subpage. See Wikipedia:Categorization § Templates for guidelines.
  • To create an interwiki link for the template itself, go to Wikidata and follow the instructions for adding links to pages.
  • To place the doc subpage into a category, add the [[Category:Category name]] code inside a <noinclude>...</noinclude> section on the doc subpage.
  • To make the template place an article into a category (when the article includes the template), add the [[Category:Category name]] code inside an <includeonly>...</includeonly> section on the template page. Exact placement within the template code may affect how the category code is executed. See Wikipedia:Categorization § Categorization using templates for guidelines.

/sandbox and /testcases

Before doing changes to a template it can be good to first copy the template code to a sandbox and run some testcases, since the template might be visible on thousands or even millions of pages. If you create subpages named exactly "/sandbox" and "/testcases" to a template then the green {{documentation}} box on the template auto-detects this and will show links to those pages in its header. See Wikipedia:Template sandbox and test cases for more information.

Several templates, one documentation page

When several templates work together or are very similar then it is often clearer and easier to maintain one single documentation page that documents them together. The simplest way to do this is to make a full documentation page at one of the templates, and then make "soft redirects" from the other templates. See, for instance: {{wrap}}.

Directly on a template page

When a documentation subpage has not been created, and the {{documentation}} template is being used with a |content= parameter on the actual template page, then to place the template itself into a category, add [[Category:Category name]] inside the documentation template, after the content. For example, for placement on the actual template page:

<!--Last line of your template code--><noinclude>
{{Documentation
 | content =
<!-- template documentation -->

[[Category:Category name]]
[[Category:Category name2]]
}}</noinclude>

When no documentation is needed

When a template as displayed will link to a page that can serve as the documentation, then separate documentation is superfluous and does not need to be created. For instance, a stub template, using the {{asbox}} template as a base, will already display pre-loaded common documentation for all stub templates using that template, and will not need additional documentation.

Tips and tricks

Here are some tips to facilitate writing documentations:

  • Links to templates like {{Japanese year|1800}} can be inserted by writing {{tlp|Japanese year|1800}}. See {{tlp}} for similar templates.
  • HTML tags like <ref group="note">...</ref> can be easily inserted with {{tag}}. This example is written as {{tag|ref|attribs=group="note"}}
  • Equals sign = can be inserted with {{=}}. For example, {{Citation needed|date=2025-08-05}} is made by {{tlp|Citation needed|date{{=}}2025-08-05}}. Avoid the equivalent notation &#61; which is not easy to read for other editors.
  • Don't forget the single <nowiki /> tag:
  • For a link to a category, use {{cat}}. For example, {{cat|Templates with incorrect parameter syntax}} becomes Category:Templates with incorrect parameter syntax.
  • Use utility templates to quickly build-up documentation , e.g. {{Collapsible option}}. See Category:Documentation shared content templates.
  • To suppress categorization of the /sandbox and /testcases pages of the template (if they exist), use this code at the bottom of the documentation subpage:
<includeonly>{{sandbox other||{{testcases other||
<!-- Categories below this line, please; interwikis at Wikidata -->

}}}}</includeonly>
  • When the template is a child infobox, documentation appears broken. Prevent this by adding the <includeonly> tag:
{{Some infobox (child) template
|  child = <includeonly>yes</includeonly>
| label1 = Hello
|  data1 = World
}}<noinclude>{{documentation}}</noinclude>

See also

伟字五行属什么 林彪为什么要叛逃 闲暇的意思是什么 肺炎吃什么药 芥末是用什么做的
肝脏低密度灶是什么意思 逆天改命是什么意思 上环是什么意思 美好的近义词是什么 mirage轮胎什么牌子
杞菊地黄丸治什么病 冬天怕冷夏天怕热是什么体质 时过境迁什么意思 送礼送什么比较好 减肥晚上可以吃什么
16开是什么意思 什么贤什么能 与会是什么意思 百花齐放是什么生肖 羡字五行属什么
手上起水泡是什么原因hcv8jop3ns9r.cn 活力是什么意思imcecn.com 男人小便刺痛吃什么药youbangsi.com 圣经是什么意思hcv8jop4ns9r.cn 孕妇喝什么牛奶对胎儿好yanzhenzixun.com
b细胞淋巴肿瘤是一种什么病hcv9jop3ns5r.cn 头痛是什么原因造成的hcv8jop0ns7r.cn 什么路不能走hcv9jop0ns8r.cn 柠檬水苦是什么原因hcv8jop6ns4r.cn 贵人命是什么意思hcv8jop8ns8r.cn
9月9号什么星座hcv9jop3ns7r.cn 黑色五行属什么hcv8jop8ns4r.cn 血管堵塞吃什么好疏通hcv9jop7ns1r.cn 糖尿病的诊断标准是什么hcv8jop1ns0r.cn 当枪使什么意思cj623037.com
提手旁的字有什么hanqikai.com 道字五行属什么hcv8jop1ns9r.cn 什么药溶血栓最好shenchushe.com 上天的动物是什么生肖hcv9jop6ns3r.cn 氟骨症是什么病hcv8jop2ns2r.cn
百度