Template:Dochead/doc: Difference between revisions
ArrowHead294 (talk | contribs) m Template is optimised and no longer needs the span |
ArrowHead294 (talk | contribs) mNo edit summary |
||
| Line 13: | Line 13: | ||
This template is invoked by placing <code>{{((}}dochead{{))}}</code> at the top of a module or template's <code>{{!((}}/doc{{))!}}</code> subpage. | This template is invoked by placing <code>{{((}}dochead{{))}}</code> at the top of a module or template's <code>{{!((}}/doc{{))!}}</code> subpage. | ||
On modules, unless <code>header=none</code> is passed, a header will appear | On modules, unless <code>header=none</code> is passed, a header will appear. By default, this will attempt to point to the template with the same name: | ||
: {| style="background-color: #f8f9fa; border: 1px solid #eaecf0; width: 95%;" | : {| style="background-color: #f8f9fa; border: 1px solid #eaecf0; width: 95%;" | ||
| Line 19: | Line 19: | ||
|} | |} | ||
but this can be changed by passing <code>temp=</code> followed by the name of the template (without <code>Template:</code> in front). | |||
=== See also === | === See also === | ||
Revision as of 17:52, 20 August 2024
This template automatically inserts the default documentation header:
Documentation transcluded from /doc
onto the main pages for certain items (mostly templates and modules), while also providing a link to the documentation subpage.
It also places items inside their respective categories, which eliminates the need to do this manually. Currently, it is configured to place modules and their documentation inside their respective categories (Category:Lua modules and Category:Module documentation).
Usage
This template is invoked by placing {{dochead}} at the top of a module or template's /doc subpage.
On modules, unless header=none is passed, a header will appear. By default, this will attempt to point to the template with the same name:
Note: Do not invoke this module directly; use the corresponding template instead: Template:Dochead.
but this can be changed by passing temp= followed by the name of the template (without Template: in front).
See also
- Template:Doc head Wikipedia – Similar template, used mainly for templates borrowed from Wikipedia.