From The Mana World
(updated)
(updated | use of Params parameter)
Line 1: Line 1:
{{Documentation
{{Documentation
   |Description = Use this template in order to create documentation for any template.
   |Description = Use this template in order to create documentation for any template.
   |Usage      = Copy the following code into your template doc page and edit as you need:
   |Usage      = Copy the following code into your template doc page and fill the values:
   |Code        =  
   |Code        =  
<nowiki>Documentation
<nowiki>Documentation
   |Description = Description about what does the template and when to use it.
   |Description =  
   |Usage      = Instructions about how to use the template.
   |Usage      =  
   |Code        = Template code
   |Code        = TemplateName {{!}}arg1=arg1value {{!}}arg2=
  |Params      = {{Parameter|arg1|Arg1 description}}
  {{Parameter|arg2|Arg2 description|Default = "Default value of arg2"}}
</nowiki>
</nowiki>
  |Params      = {{Parameter|Description|Description about what does the template and when to use it. If empty, it will be used a generic text with the template link (generated dynamically)|Default="Documentation for the [[{{#titleparts:{{FULLPAGENAME}}|1}}|{{#titleparts:{{PAGENAME}}|1}}]] template."}}
  {{Parameter|Usage|Instructions about how and where to use the template|Default = "Copy the following code into your page:"}}
  {{Parameter|Code|Template sample code, starting with its ''NAME''.
If the template uses args, add default values separated with "<code>[[Template:!|<nowiki>{{!}}</nowiki>]]</code>" between each one (inline form). If there is to many args, you should use the ''nowiki'' tag for multiline. Do not add the starting/ending braces. You should fill the params values with useful content that makes easy the edition
}}
  {{Parameter|Params|List of parameters. The <code>[[Template:Parameter|<nowiki>{{Parameter}}</nowiki>]]</code> template '''must''' to be used in order to describe each parameter| Default = null}}
}}
}}


Line 14: Line 22:
  <nowiki><noinclude>[[Category:Template documentation]]</noinclude></nowiki>
  <nowiki><noinclude>[[Category:Template documentation]]</noinclude></nowiki>
</dl>
</dl>
<noinclude>[[Category:Template documentation]]</noinclude>
<noinclude>[[Category:Template documentation]]</noinclude>

Revision as of 12:02, 19 October 2015

50px-Template-info.png Template documentation [ Edit ]

Description

Use this template in order to create documentation for any template.

Usage

Copy the following code into your template doc page and fill the values:

{{Documentation |Description = |Usage = |Code = TemplateName {{!}}arg1=arg1value {{!}}arg2= |Params = {{Parameter|arg1|Arg1 description}} {{Parameter|arg2|Arg2 description|Default = "Default value of arg2"}} }}

Parameters

List of parameters used by this template:

Description: Optional. Description about what does the template and when to use it. If empty, it will be used a generic text with the template link (generated dynamically).

Default value: "Documentation for the Documentation template."

Usage: Optional. Instructions about how and where to use the template.

Default value: "Copy the following code into your page:"

Code: Required. Template sample code, starting with its NAME.

If the template uses args, add default values separated with "{{!}}" between each one (inline form). If there is to many args, you should use the nowiki tag for multiline. Do not add the starting/ending braces. You should fill the params values with useful content that makes easy the edition .

Params: Optional. List of parameters. The {{Parameter}} template must to be used in order to describe each parameter.

Default value: null


Remember, also, categorize as Template documentation by adding this at the end:

<noinclude>[[Category:Template documentation]]</noinclude>