Changes

Jump to navigation Jump to search
→‎Documentation on the template page: Use of documentation macros
Line 40: Line 40:  
Methods 2 and 3 are useful if the template itself is locked from editing, as it still allows the documentation itself to be edited by any editor.
 
Methods 2 and 3 are useful if the template itself is locked from editing, as it still allows the documentation itself to be edited by any editor.
   −
A template will be created that can be put in all template documentation to give a brief summary.
+
The following two templates should be placed on the documentation page of all templates.  In some cases, these two templates are all that is required, but often other information should be added also.
 +
* {{tl|TemplateDoc}}  This is a brief description of the template.
 +
* {{tl|Parms}}  This is a container for a list of parameters.  If there are no parameters, just place <nowiki>{{Parms|}}</nowiki> on the page.
 +
* {{tl|Parm}}  This comprises the details of a single parameter.  Use one of these for each parameter in the template, with all of them comprising the one parameter required for the {{tl|Parms}} macro.
 +
 
 +
To make it easier, simply copy the following text to the documentation page of a template, then fill in the details.  If you are not placing this on the template page itself, omit the <nowiki><noinclude></nowiki> tags.
 +
<small>
 +
<blockquote style="border: 1px solid #AAAAAA; padding: .3em;"><tt><nowiki><noinclude></nowiki><br />
 +
<nowiki>{{</nowiki>TemplateDoc|pages=|purpose=}}<br/>
 +
<nowiki>{{</nowiki>Parms|<br/>
 +
<nowiki>{{</nowiki>Parm|name|optional? (yes/no)|purpose|Default value}} &lt;!-- Replace the fields here with your own values --><br />
 +
<nowiki>{{</nowiki>Parm||||}} &lt;!-- use as many "Parm" macros as the template has parameters --><br/>
 +
}}<br />
 +
<nowiki></noinclude></nowiki></tt>
 +
</blockquote></small>
    
=== Documentation in the template list ===
 
=== Documentation in the template list ===
nsTeam2RO, nsTeam2RW, nsTeam2_talkRO, nsTeam2_talkRW
13,254

edits

Navigation menu