Template:Documentation/doc: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
| Line 3: | Line 3: | ||
==Syntax== | ==Syntax== | ||
* '''1:''' documentation page - optional alternative doc page instead of /doc | |||
* '''type:''' optional template type. Will add category in the form of <code><nowiki>[[Category:{type} templates]]</nowiki></code>. | |||
* '''type2:''' optional template type. Will add category in the form of <code><nowiki>[[Category:{type2} templates]]</nowiki></code>. | |||
* '''draft:''' set to 1 if this documentation is for a draft template | |||
Add <code><nowiki><noinclude></nowiki>{{t|Documentation}}<nowiki></noinclude></nowiki></code> at the end of the template page. | Add <code><nowiki><noinclude></nowiki>{{t|Documentation}}<nowiki></noinclude></nowiki></code> at the end of the template page. | ||
| Line 48: | Line 53: | ||
Note that the above example also uses the [[Template:T]] template. | Note that the above example also uses the [[Template:T]] template. | ||
==Template Data== | |||
<templatedata> | |||
{ | |||
"params": { | |||
"1": { | |||
"label": "Alternative doc page", | |||
"description": "Optional alternative page for documentation instead of Template:{name}/doc. Unless if there's a specific reason to not use the default doc page, you shouldn't use an alternative.", | |||
"type": "wiki-page-name" | |||
}, | |||
"draft": { | |||
"label": "Is draft", | |||
"description": "Set to 1 if this is for a draft template.", | |||
"type": "boolean" | |||
}, | |||
"type": { | |||
"label": "Type", | |||
"description": "Optional template type.. Do not include \"Templates\" suffix.", | |||
"example": "Infobox", | |||
"type": "string", | |||
"suggested": true | |||
}, | |||
"type2": { | |||
"label": "Type 2", | |||
"description": "Optional template type. Do not include \"Templates\" suffix.", | |||
"example": "Infobox", | |||
"type": "string" | |||
} | |||
}, | |||
"paramOrder": [ | |||
"type", | |||
"type2", | |||
"draft", | |||
"1" | |||
], | |||
"description": "This template is used to insert descriptions on template pages." | |||
} | |||
</templatedata> | |||
<includeonly>[[Category:Documentation Templates]]</includeonly><noinclude>[[Category:Template Documentation]]</noinclude> | |||