Difference between revisions of "Template:Documentation"
| Line 1: | Line 1: | ||
| − | <  | + | <div style="background-color:#ECFCF4;border:1px solid #AAA;clear:both;margin:1em 0 0;padding:1em">  | 
| − | + | <div style="padding-bottom:3px;border-bottom:1px solid #aaa;margin-bottom:1ex">  | |
| − | + | <span class="editsection plainlinks" id="doc_editlinks" style="float:right;margin-left:5px">  | |
| − | + | [[{{fullurl:{{{docpage|{{FULLPAGENAME}}/doc}}}|action=edit}} edit]] [[{{fullurl:{{{docpage|{{FULLPAGENAME}}/doc}}}|action=history}} history]] [[{{fullurl:{{{docpage|{{FULLPAGENAME}}}}}|action=purge}} purge]]  | |
| − | + | </span>  | |
| − | + | <span style="font-weight:bold;font-size:125%">  | |
| − | + | [[File:Template-info.png|50px|link=|alt=Documentation icon]]  | |
| − | + | Template documentation  | |
| − | + | </span>  | |
| − | + | </div>  | |
| − | + | {{Template:{{PAGENAME}}/doc }}  | |
| − | + | </div>  | |
| − | |   | + | |
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | {{ {{  | + | |
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | |   | + | |
| − | + | ||
| − | + | ||
| − | + | ||
| − | |   | + | |
| − | + | ||
| − | + | ||
| − | + | ||
| − | <  | + | |
| − | + | ||
| − | + | ||
| − | }}  | + | |
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | </  | + | |
Revision as of 01:21, 16 April 2012
This is the {{documentation}} template.
This template displays a green doc box like you are seeing now, and automatically loads the content from a /doc subpage.
Usage
This template is used without any parameters, placed at the bottom of the template or page being documented, within <noinclude>:
<!--Last line of your template code--><noinclude>
{{documentation}}
<!-- Add categories to the /doc subpage, not here! -->
</noinclude>
Then this template automatically loads the content from the /doc subpage of the template it is used on.
Best practice
The code should be added at the bottom of the template code, with no space before <noinclude> (which would cause extra space on pages where the template is used).
Categories and interwiki links that apply to the template itself should be added to the bottom of the /doc subpage, inside <includeonly>...</includeonly> tags.
If the documentation page contains <includeonly> or <noinclude> tags as part of the visible documentation text, replace the "<" with "<".
Documentation pages
Documentation pages should end with the category links for both the documentation page and the template itself, in the following way:
<includeonly>[[Category:CATEGORY TO WHICH THE TEMPLATE BELONGS]]</includeonly> <noinclude>[[Category:Template documentation]]</noinclude>