Template:Dochead/doc: Difference between revisions
m doc |
update doc |
||
| Line 10: | Line 10: | ||
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. | ||
For templates, header options are as follows: | |||
< | * <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><br /> | ||
For modules, header options are as follows: | |||
* <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><br /> | |||
* <code>dualuse</code>: <span style{{=}}"margin-bottom: 0.5em;">'''Note:''' This module may be invoked by templates using Template:<nowiki>{{ROOTPAGENAME}}</nowiki>, or used directly from other modules.</span><br /> | |||
* <code>noinvoke</code> (default): <span style{{=}}"margin-bottom: 0.5em;">'''Note:''' This module provides functionality to a template and should not be invoked directly; use the corresponding template instead: Template:<nowiki>{{ROOTPAGENAME}}</nowiki>.</span><br /> | |||
In either case, passing in <code>header=none</code> results in no message being displayed. A custom message may also be passed in. | |||
The [[mw:Help:Magic words|"magic word"]] <code>ROOTPAGENAME</code> returns the name of the page without the namespace or subpages. By default, Lua modules that implement templates provide a link to a template of the same name. If this name is different, it can be passed in using <code>temp=Template name goes here</code>. | |||
=== See also === | === See also === | ||