xxxxxxxxxx
===On the Template/doc page===
Normally, you will want to write something like the following on the documentation page:
<pre>
==Description==
This template is used to do something.
==Syntax==
Type <code>{{t|templatename}}</code> somewhere.
==Samples==
<code><nowiki>{{templatename|input}}</nowiki></code>
results in...
{{templatename|input}}
<includeonly>Any categories for the template itself</includeonly><noinclude>[[Category:Template documentation|{{PAGENAME}}]]</noinclude>
</pre>
Use any or all of the above description/syntax/sample output sections. You may also want to add "see also" or other sections.
Note that the above example also uses the [[Template:T]] and [[Template:T/piece]] templates.
<includeonly>[[Category:Templates|{{PAGENAME}}]]</includeonly><noinclude>[[Category:Template documentation|{{PAGENAME}}]]</noinclude>