1. Template
  2. Documentation/doc
Printable Version

https://www.forum.werealive.com/wiki_index.php?title=Template:Documentation-doc
This page can be used as a building block in other pages.

This page has been seen 7 times.

;Description
[indent]This template is used to insert descriptions on template pages.[/indent];Syntax
[indent]Type <code>[noparse]<noinclude>[/noparse][template]t|documentation[/template][noparse]</noinclude>[/noparse]</code> at the end of the template page.[/indent]
[h="2"]General usage[/h]
===On the Template page===
[code]
Template code<includeonly>Any categories to be inserted into articles by the template</includeonly><noinclude>
{{documentation}}</noinclude>
[/code]Note that, depending on the template, you may need to add a clear or complete a [autolink]table[/autolink]/div just before <code>[noparse]{{documentation}}[/noparse]</code> is inserted (within the noinclude tags).

The line break is also useful as it helps prevent the documentation template "running into" previous code.

[h="3"]On the Template/doc page[/h]
[code]
;Description
[indent]This template is used to do something.[/indent];Syntax
[indent]Type <code>{{t|templatename}}</code> somewhere.[/indent];Sample output
[indent]<code><nowiki>{{templatename|foo}}</nowiki></code> gives...[/indent]:{{templatename|foo}}

<includeonly>Any categories for the template itself</includeonly><noinclude>[[Category:Template documentation|{{PAGENAME}}]]</noinclude>
[/code]Use any or all of the above description/syntax/sample output sections. You may also want to add "see also" or further usage information sections.

Note that the above example also uses the [template="T"]T[/template] and [template="T/piece"]T/piece[/template] templates.

[includeonly][category]General wiki templates|[var]PAGENAME[/var[/category]][/includeonly][noinclude][category]Template documentation|[var]PAGENAME[/var[/category]][/noinclude]