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! |