Got a spare minute? The Archives need some love. See the to-do list to find a way to help.
If you upload a new image make sure you name and categorize it properly. If in doubt, ask an admin or see our FAQ page.

Template:Documentation: Difference between revisions

From Bulbagarden Archives
Jump to navigationJump to search
mNo edit summary
No edit summary
 
(2 intermediate revisions by one other user not shown)
Line 1: Line 1:
:''The documentation below is located in [[{{FULLPAGENAME}}/doc]].''
<includeonly><div style="clear: both"></div>
<includeonly>{{{{PAGENAME}}/doc}}</includeonly><noinclude>[[Category:Templates]]</noinclude>
----
{{#if: {{{old|}}} | {{OldTemplate}} | }}
{| class="roundy" style="text-align:center; border:3px solid #444444; width:100%;"
|- style="background:#2C2C2C; color:#FFF; font-size:18px;"
! style="{{roundytop|6px}};" | <div style="width:100%; padding:3px 0px; text-align:center;">Template documentation</div>
|-
| ''Note: portions of the template sample may not be visible without values provided.''
|-
| style="border-top: 1px solid #444444;" | View or edit [[{{{1|{{FULLPAGENAME}}/doc}}}|this documentation]]. ([[Template:Documentation|About template documentation]])
|}
<div style="margin:0 1em;">
{{:{{{1|{{FULLPAGENAME}}/doc}}}}}</div></includeonly><noinclude>
{{Documentation}}
[[Category:Documentation templates]]</noinclude>

Latest revision as of 13:37, 16 October 2022


Template documentation
Note: portions of the template sample may not be visible without values provided.
View or edit this documentation. (About template documentation)

This template is used on template pages to contain documentation, instructions and information about how the template should be used.

Templates are a powerful tool, and allow for the display of lots of information in a consistent and manageable way. However, they can be confusing to new users and even experienced users can have difficulty making sense of the more complex ones. Templates should therefore be accompanied by documentation to improve usability, and to encourage others to experiment with templates and use them to their maximum potential.

What to include

A template's documentation should include a brief summary of what the template is for, and where it is intended to be used. This should be followed by a breakdown of any parameters and what values they accept. Finally, there should be at least one example of the template in use.

Usage

To include {{Documentation}} on a template page, place at the bottom of the template page, directly after the last line of code, between <noinclude>...</noinclude> tags:

~last line of your template code~<noinclude>
{{Documentation}}
</noinclude>

For templates that are no longer used, add |old=yes to include the {{OldTemplate}} template:

~last line of your template code~<noinclude>
{{Documentation|old=yes}}
</noinclude>

The documentation can then be added to the /doc subpage of the template. For example, this documentation for {{Documentation}} is located at Template:Documentation/doc.