Difference between revisions of "Template:Documentation/doc"

From MegaDrumWiki
Jump to: navigation, search
(Created page with 'In order to make documentation for a template (or anything else for that matter), add a "/doc" subpage for the template. For example, you are currently reading the documentation …')
 
Line 1: Line 1:
In order to make documentation for a template (or anything else for that matter), add a "/doc" subpage for the template. For example, you are currently reading the documentation for the "Documentation" template. Then add this to the end of your template:
+
In order to make documentation for a template, add a "/doc" subpage for the template. For example, you are currently reading the documentation for the "Documentation" template. Then add this to the end of your template:
 
<pre><noinclude>{{documentation}}</noinclude></pre>
 
<pre><noinclude>{{documentation}}</noinclude></pre>
 
The &lt;noinclude&gt; tags are used so that the documentation doesn't show up at the page where you are using your template. If you write the documentation in another language, use the "title" parameter to set the documentation header (which is "Documentation" by default). An example:
 
The &lt;noinclude&gt; tags are used so that the documentation doesn't show up at the page where you are using your template. If you write the documentation in another language, use the "title" parameter to set the documentation header (which is "Documentation" by default). An example:

Revision as of 13:58, 27 June 2010

In order to make documentation for a template, add a "/doc" subpage for the template. For example, you are currently reading the documentation for the "Documentation" template. Then add this to the end of your template:

<noinclude>{{documentation}}</noinclude>

The <noinclude> tags are used so that the documentation doesn't show up at the page where you are using your template. If you write the documentation in another language, use the "title" parameter to set the documentation header (which is "Documentation" by default). An example:

<noinclude>{{documentation|title=Документация}}</noinclude>

Also, it is sometimes necessary to add the tag directly after the template text (i.e. not on a new line).