Template:Template doc: Difference between revisions
From Beyond These Stars Official Wiki
m adjusting whitespace |
adjusting whitespace |
||
| Line 3: | Line 3: | ||
{{#if: {{{usage|{{{parameters|}}}}}} | == Usage == | {{#if: {{{usage|{{{parameters|}}}}}} | == Usage == | ||
{{{usage|}}} }} | {{{usage|}}} }} | ||
{{#if: {{{parameters|}}} | | {{#if: {{{parameters|}}} | | ||
{{{parameters}}} }} | {{{parameters}}} }} | ||
Latest revision as of 20:15, 12 September 2026
This is a template for standard sections and contents of template documentation.
Usage
Use this template inside a noinclude block on a template page to document its usage.
| Parameter | Purpose |
|---|---|
overview | One-sentence description. |
usage | A sentence or two about where and when to use the template. |
parameters | Provide a list of parameters and their purposes using the Template:Parameters table. |
examples | Provide any number of examples; include descriptions, show the code, and show what it looks like when run. |
copypasta | Inside pre</code tags, write out a fill-in-the-blank-style template call with all available parameters for authors to copy and paste into their articles or other templates.
|
add_categories | All templates that use this documentation template are given the All templates category. Add any others here, like Formatting templates or Lua module templates, properly surrounded with the Categories wiki markup.
|
Examples
It's a bit meta, but this documentation was created with this template:
{{Template doc
|overview=This is a template for standard template documentation sections
|usage=Use this template inside a <code>noinclude</code> block on a template page to document its usage
|parameters={{Parameters table...}}
|examples=It's a bit meta, but this documentation was created with this template...
|copypasta=<pre>...</pre>
|add_categories=[[Category:Developer templates]]
}}
Copypasta
{{Template doc
|overview=
|usage=
|parameters=
|examples=
|copypasta=
|add_categories=
}}
For convenience, the copypasta for the Template:Parameters table is the following:
{{Parameters_table
| first | purpose
| second | purpose
| third | purpose
| fourth | purpose
| fifth | purpose
}}


