Template:Doc/doc

From Iron Chariots Wiki
Jump to: navigation, search
Template:Doc
Purpose
Because it is desirable to keep template pages as short and simple as possible, the documentation for a high-use template (explaining what it's for and how to use it) may be kept on a "subpage" of the template page and "transcluded" into it with a short bit of wikicode (see examples below). This template is used to inform readers that the documentation they're looking at is not from the template page itself but from another page (whose title is formed by appending "/doc" onto the end of the template page title).
Usage
{{doc}}
Note
To prevent the template documentation from appearing on pages other than the template page itself, use <noinclude> tags, as shown below.
Example
In the template located at Template:If, at the point where the documentation should appear:
<noinclude>{{doc}}</noinclude>
In the template located at Template:If/doc, at the very top:
<noinclude>{{back to|Template:If}}</noinclude>
followed immediately by the text of the documentation.
Personal tools
Namespaces
Variants
Actions
wiki navigation
IronChariots.Org
Toolbox