Editor
127
edits
(tweaks) |
No edit summary |
||
| Line 2: | Line 2: | ||
==Usage== | ==Usage== | ||
<pre><noinclude>{{Documentation|<optional page name>}}</noinclude></pre> | |||
< | By default, this template retrieves documentation at <code>Template:YOURTEMPLATE/doc</code>. The unnamed first parameter is optional and can be used to point to documentation on a different page. | ||
Template:Documentation '''must''' come directly after the last character in your template – do not place it on a new line. | |||
==Example== | ==Example== | ||
If you have a template to create bold text | If you have a template to create bold text, add the documentation template like this: | ||
<pre>'''{{{1}}}'''</pre> | <pre>'''{{{1}}}'''<noinclude>{{Documentation}}</noinclude></pre> | ||
If your template is named ''Template:Bold'', and you want to reuse documentation from ''Template:Italics'', fill in the first parameter like this: | |||
<pre>'''{{{1}}}'''<noinclude>{{Documentation}}</noinclude></pre> | <pre>'''{{{1}}}'''<noinclude>{{Documentation|Template:Italics/doc}}</noinclude></pre> | ||