Template:Documentation: Difference between revisions
Appearance
No edit summary |
No edit summary |
||
Line 8: | Line 8: | ||
</div> | </div> | ||
{|style="width: 100%; margin:0; background:none; border-spacing: 0px;" | {|style="width: 100%; margin:0; margin-top: 2ex; background:none; border-spacing: 0px;" | ||
|class="template-documentation" style="width:50%;vertical-align:top;background:#ecf4fc;" | | |class="template-documentation" style="width:50%;vertical-align:top;background:#ecf4fc;" | | ||
<div style="border-bottom: 1px solid #aaa;margin-bottom:2ex;padding:3px;text-align: left;font-weight: bold;font-size: 110%;">Pages that use this Template</div> | <div style="border-bottom: 1px solid #aaa;margin-bottom:2ex;padding:3px;text-align: left;font-weight: bold;font-size: 110%;">Pages that use this Template</div> | ||
Line 17: | Line 17: | ||
{{Special:WhatLinksHere/{{FULLPAGENAME}}|namespace=10}} | {{Special:WhatLinksHere/{{FULLPAGENAME}}|namespace=10}} | ||
|} | |} | ||
</includeonly><noinclude>{{Documentation}}</noinclude> | |||
Revision as of 04:04, 28 March 2016
![]() |
This is a metatemplate; that is, a template that will rarely be used directly in articles, but rather used in other templates which will be used directly. |
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 ...