Template:Dochead/doc: Difference between revisions

ArrowHead294 (talk | contribs)
mNo edit summary
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. By default, this will attempt to point to the template with the same name:
On modules, unless <code>header=none</code> is passed, a header will appear to inform users that modules should be called via templates instead of being invoked directly:


<blockquote class="toccolours">
<blockquote class="toccolours">
'''Note:''' Do not invoke this module directly; use the corresponding template instead: [[mw:Help:Magic words#Page names|Template:{{((}}ROOTPAGENAME{{))}}]].
'''Note:''' Do not invoke this module directly; use the corresponding template instead:
</blockquote>
</blockquote>


but this can be changed by passing <code>temp=</code> followed by the name of the template. Whether <code>Template:</code> is present in what is passed to <code>temp</code> doesn't matter, as long as a template with the specified name exists.
By default, this will attempt to point to the template with the same name, but this can be changed by passing <code>temp=</code> followed by the name of the template. Whether <code>Template:</code> is present in what is passed to <code>temp</code> doesn't matter, as long as a template with the specified name exists.


=== See also ===
=== See also ===