Template:Documentation/doc: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
| (One intermediate revision by one other user not shown) | |||
| Line 1: | Line 1: | ||
{{Documentation/Header}} | |||
This template is used to insert | {{Lua|Documentation}} | ||
{{CSS}} | |||
This template is used to insert documentation to template pages. | |||
==Syntax== | ==Syntax== | ||
* {{T|Documentation}} will produce the documentation template. | |||
* {{T|Documentation|foo}} will fill in the documentation from the "<code>foo</code>" template. | |||
* {{T|Documentation|p1=content=This template does something}} will fill in the documentation with the content "<code>This template does something</code>." (not recommended except for very, very short documentation) | |||
* {{T|Documentation|p1=heading=Important information}} will replace the default heading with "<code>Important information</code>". | |||
* {{T|Documentation|p1=type=category}} will add the "<code>category Templates</code>" category. | |||
==Template Data== | |||
<templatedata> | |||
{ | |||
"description": { | |||
"en": "This template is used to insert descriptions on template pages." | |||
}, | |||
"format": "inline", | |||
"params": { | |||
"1": { | |||
"label": { | |||
"en": "Custom Documentation Page" | |||
}, | |||
"description": { | |||
"en": "Page containing the documentation" | |||
}, | |||
"default": "{{FULLPAGENAME}}/doc", | |||
"type": "wiki-page-name" | |||
}, | |||
The | "heading": { | ||
"label": { | |||
"en": "Heading" | |||
}, | |||
"description": { | |||
"en": "Custom heading" | |||
}, | |||
"default": { | |||
"en": "[[File:Template-icon.svg|50px|link=|alt=Documentation icon]] Documentation" | |||
}, | |||
"type": "line" | |||
}, | |||
"preload": { | |||
"label": { | |||
"en": "Preload Page" | |||
}, | |||
"description": { | |||
"en": "The page to preload if the `/doc` subpage doesn't exist." | |||
}, | |||
"default": "Template:Documentation/preload", | |||
</ | "type": "wiki-page-name" | ||
}, | |||
"content": { | |||
"label": { | |||
"en": "Content", | |||
"tr": "İçerik" | |||
}, | |||
"description": { | |||
"en": "Custom documentation content, prevents transclusion of `/doc` subpage." | |||
}, | |||
"type": "content" | |||
}, | |||
"type": { | |||
"label": "Type", | |||
"description": "Category to categorize template in.", | |||
"type": "string", | |||
"suggested": true | |||
} | |||
} | |||
} | |||
</templatedata> | |||
Latest revision as of 20:28, 29 August 2025
This is the documentation page for Documentation. It contains usage information, categories, and other content not part of the original template page. | ||
|---|---|---|
| Main | Documentation | Usage |
This template uses Module:Documentation, a script written in Lua.
This template is used to insert documentation to template pages.
Syntax
- {{Documentation}} will produce the documentation template.
- {{Documentation|foo}} will fill in the documentation from the "
foo" template. - {{Documentation|content = This template does something}} will fill in the documentation with the content "
This template does something." (not recommended except for very, very short documentation) - {{Documentation|heading = Important information}} will replace the default heading with "
Important information". - {{Documentation|type = category}} will add the "
category Templates" category.
Template Data
This template is used to insert descriptions on template pages.
| Parameter | Description | Type | Status | |
|---|---|---|---|---|
| Custom Documentation Page | 1 | Page containing the documentation
| Page name | optional |
| Heading | heading | Custom heading
| Line | optional |
| Preload Page | preload | The page to preload if the `/doc` subpage doesn't exist.
| Page name | optional |
| Content | content | Custom documentation content, prevents transclusion of `/doc` subpage. | Content | optional |
| Type | type | Category to categorize template in. | String | suggested |