跳转到内容

模板:Documentation/testcases

来自天灾之下:危险连接资料站
wiki>Clump2025年10月10日 (五) 02:38的版本 (Reverted edits by ~2025-28243-36 (talk) to last version by Wladek92)
(差异) ←上一版本 | 最后版本 (差异) | 下一版本→ (差异)

Testing sandbox version

{{Documentation/sandbox}}
模板文档

Usage

Customizing display

Overrides exist to customize the output in special cases:

  • {{documentation|heading=}}: change the text of the "documentation" heading. If this is set to blank, the entire heading line (including the first [edit] link) will also disappear.

Rationale

This template allows any page to use any documentation page, and makes it possible to protect templates while allowing anyone to edit the template's documentation, categories, and interwiki links. It also reduces server resources by circumventing a technical limitation of templates (see a developer's explanation).

See also

This template allows to generate the documentation part of a given template.

模板参数[编辑模板数据]

参数描述类型状态
contentcontent

defines the body of the documentation part

字符串可选
headingheading

allows to customise the header of the documentation part

字符串可选
{{Documentation/sandbox|content=
== Section ==
{{lorem ipsum}}
}}
模板文档

Section

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

Testing main template

  • Without parameter
    {{Documentation}}
模板文档

Usage

Customizing display

Overrides exist to customize the output in special cases:

  • {{documentation|heading=}}: change the text of the "documentation" heading. If this is set to blank, the entire heading line (including the first [edit] link) will also disappear.

Rationale

This template allows any page to use any documentation page, and makes it possible to protect templates while allowing anyone to edit the template's documentation, categories, and interwiki links. It also reduces server resources by circumventing a technical limitation of templates (see a developer's explanation).

See also

This template allows to generate the documentation part of a given template.

模板参数[编辑模板数据]

参数描述类型状态
contentcontent

defines the body of the documentation part

字符串可选
headingheading

allows to customise the header of the documentation part

字符串可选


  • With page contents in parameter content=
{{Documentation|content=
== Section 1 ==
{{lorem ipsum}}
}}
模板文档

Section 1

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.


  • With lower case variant :
{{documentation|content=
== Section 2 ==
{{lorem ipsum}}
}}
模板文档

Section 2

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.


  • With heading= modification
{{documentation|heading=Note that this header has changed|content=
== Section 3 ==
{{lorem ipsum}}
}}
Note that this header has changed

Section 3

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.


  • No header on the page
{{documentation|heading=|content=
== Section 4 ==
{{lorem ipsum}}
}}

Section 4

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.


  • Unknown parameter
{{documentation|2=Note that this header has changed|content=
== Section 5 ==
{{lorem ipsum}}
}}
模板文档

Section 5

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.