Template:Dochead/doc: Difference between revisions
Jump to navigation
Jump to search
update to reflect template changes |
mNo edit summary |
||
| Line 19: | Line 19: | ||
* <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> | * <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> | ||
* <code>noinvoke</code> (default): <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>. | |||
In either case, passing in <code>header=none</code> results in no message being displayed. A custom message may also be passed in. | In either case, passing in <code>header=none</code> results in no message being displayed. A custom message may also be passed in. | ||
=== See also === | === See also === | ||
* [[Template: Documentation]] – inserts a documentation section onto a template or module. | * [[Template: Documentation]] – inserts a documentation section onto a template or module. | ||
* [[Template: Doc head Wikipedia]] – similar template, used mainly for templates borrowed from Wikipedia. | * [[Template: Doc head Wikipedia]] – similar template, used mainly for templates borrowed from Wikipedia. | ||
Revision as of 10:46, 24 October 2025
- This template is implemented by the Lua module Module:Dochead.
- This template invokes the following functions: dochead from Dochead.
This template automatically categorizes documentation by namespace, which eliminates the need to do this manually. Currently, it is configured to place templates, modules, and their documentation inside their respective categories:
- Category:Templates
- Category:Lua modules
- Category:Template documentation
- Category:Module documentation
Usage
This template is invoked by placing {{dochead}} at the top of a module or template's /doc subpage.
For templates, header options are as follows:
metatemplate: Note: This template is used to build other templates and should not be used standalone except for testing and simple usage.
For modules, header options are as follows:
metamodule: Note: This module primarily provides functionality for other Lua modules and cannot be invoked by templates.dualuse: Note: This module may be invoked by templates by using its corresponding template, or used directly from other modules.noinvoke(default): Note: This module should not be invoked directly; use its corresponding template instead.
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 temp=Template name goes here.
In either case, passing in header=none results in no message being displayed. A custom message may also be passed in.
See also
- Template: Documentation – inserts a documentation section onto a template or module.
- Template: Doc head Wikipedia – similar template, used mainly for templates borrowed from Wikipedia.