Template:Documentation

From Go-Go Town Wiki
Jump to navigation Jump to search
View or edit this template's documentation. (How does this work?)
Note: portions of the template samples may not be visible without values provided.

Description

This template is used to insert descriptions on template pages.

Syntax

At the end of the template page, add:

<noinclude>{{Documentation}}</noinclude>

To transclude an alternative page from the /doc subpage, add:

<noinclude>{{Documentation|documentation page}}</noinclude>

On the template page

This is the normal format when used:

TEMPLATE CODE
<includeonly>Any content to be inserted into articles by the template</includeonly>
<noinclude>{{Documentation}}</noinclude>

If your template is not a completed div or table, you may need to close the tags before {{Documentation}} is inserted (within the noinclude tags).

A line break right before {{Documentation}} can be useful to prevent the documentation template "running into" previous code.

On the template documentation page

The documentation page is usually located on the /doc subpage for a template, but a different page can be specified with the first parameter of the template (see Syntax).

Normally, you will want to write something like the following on the documentation page:

== Description ==

This template is used to do something.

== Syntax ==

Type <code>{{templatename|attr1=true}}</code> somewhere.

== Samples ==

<code><nowiki>{{templatename|input}}</nowiki></code>

results in...

``Template Output``

Use any or all of the above description/syntax/sample output sections. You may also want to add "see also" or other sections.