(Updated the Documentation template from the Templates Wiki.) |
(Removed testcases from template.) |
||
Line 188: | Line 188: | ||
}}<!-- |
}}<!-- |
||
- |
- |
||
- Sandbox |
- Sandbox |
||
- |
- |
||
-->Editors can experiment in this {{#switch: {{NAMESPACE}}|{{ns:Template}} = template|{{ns:Module}} = module |#default = page}}'s <!-- |
-->Editors can experiment in this {{#switch: {{NAMESPACE}}|{{ns:Template}} = template|{{ns:Module}} = module |#default = page}}'s <!-- |
||
Line 283: | Line 283: | ||
}}<!-- |
}}<!-- |
||
--> |
--> page.<br/> <!-- |
||
-->{{#ifexist: {{#if: {{{testcases|}}} | {{{testcases}}} |
|||
| {{#if: {{{page|}}} |
|||
| {{{page}}} |
|||
| {{#ifeq: {{SUBPAGENAME}}|sandbox |
|||
| {{NAMESPACE}}:{{BASEPAGENAMEE}} |
|||
| {{FULLPAGENAMEE}} |
|||
}}<!-- end ifeq subpagename = sandbox --> |
|||
}}/testcases<!-- end if page --> |
|||
}}<!--End if testcases --> |
|||
| [[{{#if: {{{testcases|}}} | {{{testcases}}} |
|||
| {{#if: {{{page|}}} |
|||
| {{{page}}} |
|||
| {{#ifeq: {{SUBPAGENAME}}|sandbox |
|||
| {{NAMESPACE}}:{{BASEPAGENAMEE}} |
|||
| {{FULLPAGENAMEE}} |
|||
}}<!-- end ifeq subpagename = sandbox --> |
|||
}}/testcases<!-- end if page --> |
|||
}}<!--End if testcases -->|testcases]]<!-- |
|||
--> <small>([{{fullurl: {{#if: {{{testcases|}}} | {{{testcases}}} |
|||
| {{#if: {{{page|}}} |
|||
| {{{page}}} |
|||
| {{#ifeq: {{SUBPAGENAME}}|sandbox |
|||
| {{NAMESPACE}}:{{BASEPAGENAMEE}} |
|||
| {{FULLPAGENAMEE}} |
|||
}}<!-- end ifeq subpagename = sandbox --> |
|||
}}/testcases<!-- end if page --> |
|||
}}<!--End if testcases -->|action=edit}}<!-- end fullurl --> edit])</small> |
|||
| testcases ([{{fullurl: {{#if: {{{testcases|}}} | {{{testcases}}} |
|||
| {{#if: {{{page|}}} |
|||
| {{{page}}} |
|||
| {{#ifeq: {{SUBPAGENAME}}|sandbox |
|||
| {{NAMESPACE}}:{{BASEPAGENAMEE}} |
|||
| {{FULLPAGENAMEE}} |
|||
}}<!-- end ifeq subpagename = sandbox --> |
|||
}}/testcases<!-- end if page --> |
|||
}}<!--End if testcases -->|action=edit&preload=Template:Documentation/preload-testcases&summary=<!-- |
|||
-->{{urlencode:Create testcases for template <!-- |
|||
-->[[{{{page|{{#ifeq: {{SUBPAGENAME}}|sandbox |
|||
| {{NAMESPACE}}:{{BASEPAGENAMEE}} |
|||
| {{FULLPAGENAMEE}} |
|||
}} }}}]] |
|||
}}<!-- end url encode --> |
|||
}}<!-- end fullurl --> create])</small> |
|||
}} pages.<br/><!-- |
|||
- |
- |
||
- Category / Subpages text |
- Category / Subpages text |
Revision as of 01:10, 24 August 2022
- Description
- This template is used to insert documentation on template pages.
- Syntax
- Type
<noinclude>
at the end of the template page.{{Documentation}}
</noinclude>
General usage
On the Template page
Template code<noinclude> {{Documentation}} </noinclude>
On the Template/doc page
; Description : This template is used to do something. ; Dependencies: :* Uses (some CSS, JS, file, or other template). ; Syntax : Type <code>{{T|Templatename}}</code> somewhere. ; Sample output : <code><nowiki>{{Templatename|foo}}</nowiki></code> gives... : {{Templatename|foo}} <includeonly>Any categories for the template itself </includeonly><noinclude> [[Category:Template documentation]] </noinclude>
Use any or all of the above description/syntax/sample output sections. You may also want to add "see also" or further usage information sections.
Note that the above example also uses {{T}}
.
Dependencies
- Templates
- Template:Tocright (Template:Tocright/doc)
TemplateData
This template is used to display documentation on template pages. It also adds some tools to help the editor to modify the /doc subpage and the template.
Parameter | Description | Type | Status | |
---|---|---|---|---|
Custom Documentation Location | 1 | The name of the custom /doc subpage.
| String | optional |
Inline Documentation Content | content | Content if documentation page will not be transcluded
| String | optional |
Custom Sandbox Location | sandbox | Specifies the /sandbox subpage location
| String | optional |
Heading text | heading | Changes the default "Documentation" header to a different one
| String | optional |
Custom footer content | footer | Replaces the default link box with a custom one
| Unbalanced wikitext | optional |
Editors can experiment in this template's sandbox (create | mirror) page.
Add categories and interwikis to the /doc subpage. Subpages of this template.