Template:Documentation
From Dragon Mania Legends (DML) Wiki
Template documentation |
---|
Note: portions of the template sample may not be visible without values provided. |
View or edit this template's documentation (about template documentation). |
No TemplateStyles exist. If you remember to add after the opening <includeonly> tag:
|
<templatestyles src="Documentation/styles.css" />
|
Description
The {{documentation}}
template includes documentation from its /doc
subpage, on a main template page. This allows template documentation to be updated without having to edit the template itself.
Template Page
At the bottom of a template page put:
<noinclude> {{documentation}} <!-- Add categories to the /doc subpage --> </noinclude>
Next, preview the page (if no /doc
page exists) which displays a redlink, click that to get the doc page started.
Subpage (/doc)
At the top of the /doc
page put the following:
<noinclude>{{documentation subpage}}</noinclude> <!-- Plain text descriptions, then examples, then template data here --> ==Example(s)== * <code><nowiki></nowiki></code> gives: <!-- result here if not live query --> ==See Also== * {{template|Template}}, the template that does something as related to this one, for easy finding. * {{ctg|Dragons}}, a category (or page or something) related to this template's use (if applicable/helpful when working on the template or its docs). <templatedata> </templatedata> <includeonly> <!-- Categories below this line --> </includeonly>
Move Doc Text & Data
Next, move existing non-template content after the first {{documentation}}
line, and before the <includeonly>
:
- Necessary text blurbs go first (unless it is just template data, see below).
- Examples go next, under an
==Example(s)==
heading. - Template data goes next (before the
<includeonly>
section).
Categories
Categories are moved into the <includeonly>
section of the /doc
page. These categories are then applied to the template page from the /doc
page via transclusion. The only exceptions to this are when:
- The template needs to pass categories onto the pages it used on.
- In the
{{Documentation}}
and{{Documentation subpage}}
templates themselves.
See Also
This template is for linking to documentation moved to a /doc subpage, particularly useful when a template already has significant content and documentation/template data clutters up the template too much.
Parameter | Description | Type | Status | |||
---|---|---|---|---|---|---|
No parameters specified |