Template:Documentation/doc: Difference between revisions
Appearance
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
This template is used to display the documentation for templates, including itself. | This template is used to display the documentation for templates, including itself. | ||
To write documentation for the template | To write documentation for the template <code>Template:Foobar</code>, edit the document <code>Template:Foobar/doc</code>. | ||
edit the document | |||
Then to use this template, include | Then to use this template, include | ||
Line 15: | Line 9: | ||
at the bottom of the template itself. | at the bottom of the template itself. | ||
So Template:Foobar looks like: | So <code>Template:Foobar</code> looks like: | ||
(... all the actual template code ...) | (... all the actual template code ...) | ||
<nowiki><noinclude>{{Documentation}}</noinclude></nowiki> | <nowiki><noinclude>{{Documentation}}</noinclude></nowiki> | ||
And Template:Foobar/doc looks like: | And <code>Template:Foobar/doc</code> looks like: | ||
Here's some helpful instructions on using the Foobar template ... | Here's some helpful instructions on using the Foobar template ... |
Revision as of 19:58, 26 March 2016
This template is used to display the documentation for templates, including itself.
To write documentation for the template Template:Foobar
, edit the document Template:Foobar/doc
.
Then to use this template, include
<noinclude>{{Documentation}}</noinclude>
at the bottom of the template itself.
So Template:Foobar
looks like:
(... all the actual template code ...) <noinclude>{{Documentation}}</noinclude>
And Template:Foobar/doc
looks like:
Here's some helpful instructions on using the Foobar template ...