Template:Documentation/Documentation

From GenWiki

Jump to: navigation, search
Documentation Subpage This article is a Documentation Subpage of Template:Documentation.


Reading and unterstanding a template is much easier if source code (WikiText) and documentation are in different places (=articles). At the same time this way WikiText parser gets less load to do...


Usage

At the end of a template you may write <noinclude>{{Documentation}}</noinclude>.[1]

Subpage /Doku consisting the real template documentation starts with:

<noinclude>{{Documentation/Docupage}}</noinclude>[2]

end continues with text, describing template and its usage.


Example

In this fictive example template ABC gets a documentation.

Template

Name: Template:ABC

<includeonly>...Program Code of Template...</includeonly><noinclude>
{{Documentation}}
</noinclude>

Documentation

Name: Template:ABC/Documentation

<noinclude>{{Documentation/Docupage}}</noinclude>
This template is mentioned for ...
== Parameter ==
1. ...
== Example ==
=== Usage ===
<code><nowiki>{{ABC|...}}</nowiki></code>
=== Display ===
{{ABC|...}}



  1. This way you automatically include content of subpage /Documentation.
  2. So you get an infobox with a link to the template itself (a backlink to the template page).
Personal tools
GenWiki-internal