This is a mirror host of the KP Official Wiki on Miraheze. We dont actually mirror we host the same content
Template:Documentation/doc: Difference between revisions
miraheze-user->FANDOM No edit summary |
miraheze-user->Aeywoo Updated Template:Documentation/doc. |
||
Line 1: | Line 1: | ||
<!-- you can remove this line and everything above it if you don't see any big bold red text --> | |||
This template is used to insert | ;Description | ||
:This template is used to insert documentation on template pages. | |||
;Syntax | |||
:Type <code><noinclude>{{T|Documentation}}</noinclude></code> at the end of the template page. | |||
== General usage == | |||
=== On the Template page === | |||
<pre> | <pre> | ||
Template code<noinclude> | |||
< | {{Documentation}} | ||
</noinclude> | |||
</pre> | </pre> | ||
=== On the Template/doc page === | |||
===On the | |||
<pre> | <pre> | ||
;Description | |||
This template is used to do something. | :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> | |||
< | </pre> | ||
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|T}}. | ||
== Dependencies == | |||
;Templates | |||
:[[Template:Documentation/preload]] | |||
:[[Template:Documentation/preload-sandbox]] | |||
:[[Template:Documentation/preload-testcases]] | |||
:[[Template:Tocright]] ([[Template:Tocright/doc]]) | |||
== TemplateData == | |||
<templatedata> | |||
{ | |||
"params": { | |||
"1": { | |||
"description": "The name of the custom /doc subpage.", | |||
"example": "Template:Documentation/doc", | |||
"default": "{{FULLPAGENAME}}/doc", | |||
"label": "Custom Documentation Location", | |||
"type": "string" | |||
}, | |||
"content": { | |||
"description": "Content if documentation page will not be transcluded", | |||
"example": "This template creates quotes.", | |||
"label": "Inline Documentation Content", | |||
"type": "string" | |||
}, | |||
"sandbox": { | |||
"label": "Custom Sandbox Location", | |||
"description": "Specifies the /sandbox subpage location", | |||
"example": "Template:Example/sandbox", | |||
"type": "string", | |||
"default": "{{FULLPAGENAME}}/sandbox" | |||
}, | |||
"testcases": { | |||
"label": "Custom Testcases Location", | |||
"description": "Specifies the /testcases subpage location", | |||
"example": "Template:Example/testcases", | |||
"type": "string", | |||
"default": "{{FULLPAGENAME}}/testcases" | |||
}, | |||
"heading": { | |||
"label": "Heading text", | |||
"description": "Changes the default \"Documentation\" header to a different one", | |||
"example": "About this template", | |||
"type": "string" | |||
}, | |||
"footer": { | |||
"label": "Custom footer content", | |||
"description": "Replaces the default link box with a custom one", | |||
"example": "Documentation is automatically generated by {{T|Ambox}}.<br/>Its contents are shown here.", | |||
"type": "unbalanced-wikitext" | |||
} | |||
}, | |||
"description": "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." | |||
} | |||
</templatedata> | |||
<includeonly>[[Category:Documentation templates]]</includeonly><noinclude>[[Category:Template documentation]]</noinclude> | <includeonly>[[Category:Documentation templates| ]]</includeonly><noinclude>[[Category:Template documentation]]</noinclude> |
Latest revision as of 05:55, 21 January 2024
- Description
- This template is used to insert documentation on template pages.
- Syntax
- Type
<noinclude>{{Documentation}}</noinclude>
at the end of the template page.
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:Documentation/preload
- Template:Documentation/preload-sandbox
- Template:Documentation/preload-testcases
- Template:Tocright (Template:Tocright/doc)
TemplateData
<templatedata> { "params": { "1": { "description": "The name of the custom /doc subpage.", "example": "Template:Documentation/doc", "default": "Template:Documentation/doc/doc", "label": "Custom Documentation Location", "type": "string" }, "content": { "description": "Content if documentation page will not be transcluded", "example": "This template creates quotes.", "label": "Inline Documentation Content", "type": "string" }, "sandbox": { "label": "Custom Sandbox Location", "description": "Specifies the /sandbox subpage location", "example": "Template:Example/sandbox", "type": "string", "default": "Template:Documentation/doc/sandbox" }, "testcases": { "label": "Custom Testcases Location", "description": "Specifies the /testcases subpage location", "example": "Template:Example/testcases", "type": "string", "default": "Template:Documentation/doc/testcases" },
"heading": {
"label": "Heading text",
"description": "Changes the default \"Documentation\" header to a different one",
"example": "About this template",
"type": "string"
},
"footer": {
"label": "Custom footer content",
"description": "Replaces the default link box with a custom one",
"example": "Documentation is automatically generated by {{Ambox}}.
Its contents are shown here.",
"type": "unbalanced-wikitext"
}
},
"description": "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."
}
</templatedata>