Template:Dochead/doc
- 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.
In either case, passing in header=none results in no message being displayed. A custom message may also be passed in.
The "magic word" ROOTPAGENAME 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 temp=Template name goes here.
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.