(Created template) |
m (Removed the "message" parameter from {{notice}}) |
||
Line 3: | Line 3: | ||
| title = Template documentation | | title = Template documentation | ||
| type = information | | type = information | ||
| | | {{{{FULLPAGENAME}}/Documentation}} | ||
}} | }} | ||
Line 10: | Line 10: | ||
| title = Missing template documentation | | title = Missing template documentation | ||
| type = problem | | type = problem | ||
| | | This template is missing documentation. | ||
Template documentation is important because it tells people what the template is intended to do, and how to use it. | Template documentation is important because it tells people what the template is intended to do, and how to use it. | ||
Latest revision as of 17:26, 12 August 2016
Template documentation This template is for adding documentation to other templates.
UsageTo add documentation to a template, simply add the following to the bottom of the template code: <noinclude> {{doc}} </noinclude> It is usually important that there be no space at all between the last bit of the template code, and the documentation code lines.
Normally you also want to wrap the actual template code in For example, if your template code looked like this: This is {{{my}}} template. To add documentation, first you wrap the template in <includeonly>This is {{{my}}} template.</includeonly> Then you add the <includeonly>This is {{{my}}} template.</includeonly><noinclude> {{doc}} </noinclude> If no documentation page exists for the template this documentation template is used for, there will be a warning on the template page. The template will also be added to the hidden category Templates needing documentation. It is very important to use the <noinclude> tags! |