(Updated the Documentation template documentation from the Templates Wiki.) |
m (Updated.) |
||
(2 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
{{#ifexist: Template:T | <!-- nothing; T already copied/exists --> | :<strong class="error">Please copy <nowiki>{{T}}</nowiki> from [[w:c:templates:Template:T]] to [[Template:T]]!</strong>}}<!-- |
|||
-->{{#ifexist: Template:T/doc | <!-- nothing; T's documentation already copied/exists --> | :<strong class="error">Please copy <nowiki>{{T}}</nowiki>'s documentation from [[w:c:templates:Template:T/doc]] to [[Template:T/doc]]!</strong>}}<!-- |
|||
-->{{#ifexist: Template:Tocright | <!-- nothing; Tocright already copied/exists --> | :<strong class="error">Please copy <nowiki>{{Tocright}}</nowiki> from [[w:c:templates:Template:Tocright]] to [[Template:Tocright]]!</strong>}}<!-- |
|||
-->{{#ifexist: Template:Tocright/doc | <!-- nothing; Tocright's documentation already copied/exists --> | :<strong class="error">Please copy <nowiki>{{Tocright}}</nowiki>'s documentation from [[w:c:templates:Template:Tocright/doc]] to [[Template:Tocright/doc]]!</strong>}}<!-- |
|||
<!-- you can remove this line and everything above it if you don't see any big bold red text --> |
|||
<noinclude>{{Documentation subpage}}</noinclude> |
<noinclude>{{Documentation subpage}}</noinclude> |
||
; Description |
; Description |
||
Line 43: | Line 37: | ||
== Dependencies == |
== Dependencies == |
||
; Templates |
; Templates |
||
: [[Template:Documentation/preload]] |
|||
: [[Template:Documentation/preload-sandbox]] |
|||
: [[Template:Documentation/preload-testcases]] |
|||
: [[Template:Tocright]] ([[Template:Tocright/doc]]) |
: [[Template:Tocright]] ([[Template:Tocright/doc]]) |
||
Line 71: | Line 62: | ||
"type": "string", |
"type": "string", |
||
"default": "{{FULLPAGENAME}}/sandbox" |
"default": "{{FULLPAGENAME}}/sandbox" |
||
}, |
|||
"testcases": { |
|||
"label": "Custom Testcases Location", |
|||
"description": "Specifies the /testcases subpage location", |
|||
"example": "Template:Example/testcases", |
|||
"type": "string", |
|||
"default": "{{FULLPAGENAME}}/testcases" |
|||
}, |
}, |
||
"heading": { |
"heading": { |
||
Line 88: | Line 72: | ||
"label": "Custom footer content", |
"label": "Custom footer content", |
||
"description": "Replaces the default link box with a custom one", |
"description": "Replaces the default link box with a custom one", |
||
"example": "Documentation is automatically generated by {{T|Ambox}}. |
"example": "Documentation is automatically generated by {{T|Ambox}}. Its contents are shown here.", |
||
"type": "unbalanced-wikitext" |
"type": "unbalanced-wikitext" |
||
} |
} |
Latest revision as of 03:24, 8 October 2022

It contains usage information, categories, interlanguage links and other content that is not part of the original template page.
- 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[edit source]
On the Template page[edit source]
Template code<noinclude> {{Documentation}} </noinclude>
On the Template/doc page[edit source]
; 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[edit source]
- Templates
- Template:Tocright (Template:Tocright/doc)
TemplateData[edit source]
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 |