Template:Dochead/doc: Difference between revisions

Ganaram inukshuk (talk | contribs)
mNo edit summary
Ganaram inukshuk (talk | contribs)
mNo edit summary
Line 8: Line 8:


=== Usage ===
=== Usage ===
This template is invoked by placing <code><nowiki>{{dochead}}</nowiki></code> at the top of a module or template's <code>/doc</code> subpage.
This template is invoked by placing <code><nowiki>{{dochead}}</nowiki></code> at the top of a module or template's <code>/doc</code> subpage. Default messages can be displayed, depending on that module or template's use:


For templates, header options are as follows:
<code>metatemplate</code> (templates only)
 
: <span style{{=}}"margin-bottom: 0.5em;">'''Note:''' This template is used to build other templates and should not be used standalone except for testing and simple usage.</span>
* <code>metatemplate</code>: <span style{{=}}"margin-bottom: 0.5em;">'''Note:''' This template is used to build other templates and should not be used standalone except for testing and simple usage.</span>
<code>metamodule</code> (modules only)
 
: <span style{{=}}"margin-bottom: 0.5em;">'''Note:''' This module primarily provides functionality for other Lua modules and cannot be invoked by templates.</span>  
For modules, header options are as follows:
<code>dualuse</code> (modules only)
 
: <span style{{=}}"margin-bottom: 0.5em;">'''Note:''' This module may be invoked by templates by using its corresponding template, or used directly from other modules.</span>
* <code>metamodule</code>: <span style{{=}}"margin-bottom: 0.5em;">'''Note:''' This module primarily provides functionality for other Lua modules and cannot be invoked by templates.</span>
<code>noinvoke</code> (default for modules only)
* <code>dualuse</code>: <span style{{=}}"margin-bottom: 0.5em;">'''Note:''' This module may be invoked by templates by using its corresponding template, or used directly from other modules.</span>
: <span style{{=}}"margin-bottom: 0.5em;">'''Note:''' This module should not be invoked directly; use its corresponding template instead.</span>
* <code>noinvoke</code> (default): <span style{{=}}"margin-bottom: 0.5em;">'''Note:''' This module should not be invoked directly; use its corresponding template instead.</span>


When used on modules, this template will attempt to link to its corresponding template of the same name. If the template and module names differ, it can be passed in using <code>temp=Template name goes here</code>.
When used on modules, this template will attempt to link to its corresponding template of the same name. If the template and module names differ, it can be passed in using <code>temp=Template name goes here</code>.