Template:Documentation/doc: Difference between revisions
m Cleanup |
+ how (i think) this template works |
||
Line 1: | Line 1: | ||
{{Dochead}}{{wikipedia}} | {{Dochead}}{{wikipedia}} | ||
The <code><nowiki>{{documentation}}</nowiki></code> template is used to contain information and instructions for templates and modules. | The <code><nowiki>{{documentation}}</nowiki></code> template is used to contain information and instructions for templates and modules. Wikipedia's documentation template has modules that help render the dialog boxes, but here the box is hard-coded to simplify things. | ||
__NOTOC__ | __NOTOC__ | ||
=== Templates === | === Usage === | ||
This template automatically extracts contents from the <code>/doc</code> subpage of any page. You can optionally add an unnamed argument, which will be displayed in place. | |||
==== Templates ==== | |||
On templates, place <code><nowiki>{{documentation}}</nowiki></code> on the page itself, place the relevant categories afterwards, and enclose them in <code><nowiki><noinclude></nowiki></code> tags: | On templates, place <code><nowiki>{{documentation}}</nowiki></code> on the page itself, place the relevant categories afterwards, and enclose them in <code><nowiki><noinclude></nowiki></code> tags: | ||
Line 16: | Line 18: | ||
</pre> | </pre> | ||
=== Modules === | ==== Modules ==== | ||
On pages consisting of exclusively code (modules, CSS, JS, etc.), place this template on the <code>/doc</code> subpage and pass the notes, along with {{tlx|dochead}}, in as the first unnamed parameter: | On pages consisting of exclusively code (modules, CSS, JS, etc.), place this template on the <code>/doc</code> subpage and pass the notes, along with {{tlx|dochead}}, in as the first unnamed parameter: | ||