Template:Template doc/doc

This template is kept temporarily until pages are converted to the merged and improved Documentation, template.

Note differences in usage mean it cannot be redirected. See Template parameter differences below.

This template displays a "Template documentation" box just like you are seeing now.

Usage
Add to the main template at the end of the template code:

&lt;noinclude> 

or with a parameter: 1 = name of the documentation page.

Make sure the opening  begins on the same line as the last character of the template code (or text), and not on a new line. Otherwise, extra space will be inserted below the template when it is used, which is usually not wanted.

If the template is already protected, ask an administrator to do this, or request an edit by using  on the template’s talk page. If documentation, categories and interwiki links already exist in a section enclosed within a  element, move them into the documentation subpage, as it is best not to have documentation split across two separate pages.

Click the "edit" link, which points to the /doc subpage, and write documentation there. If the /doc page does not exist yet Template doc/Preload is preloaded.

Add categories and interwiki links to the /doc subpage inside.

Advantages

 * It allows templates to be protected where necessary, while allowing anyone to edit the documentation.

Limitation
A pipe character in the documentation page which is not inside double or triple braces or double brackets disturbs proper functioning of this template, because the content of that page is assigned to a template parameter. Use &amp;#124; instead.

If the documentation contains includeonly or noinclude tags within nowiki tags, replace the "<" with "&amp;lt;".

Parameter for /doc path

 * Template doc uses 1=&#123;&#123;PAGENAME&#125;&#125;
 * and then transcluded
 * Template doc inline using
 * 1=&#123;&#123; &#123;&#123;SUBJECTSPACE&#125;&#125;:&#123;&#123;&#123;1&#125;&#125;&#125; &#125;&#125;
 * 2=&#123;&#123;SUBJECTSPACE&#125;&#125;:&#123;&#123;&#123;1&#125;&#125;&#125;


 * Documentation uses 1=&#123;&#123;FULLPAGENAME&#125;&#125;
 * Documentation, template uses 1=&#123;&#123;FULLPAGENAME&#125;&#125;
 * Template doc inline uses 2=&#123;&#123;FULLPAGENAME&#125;&#125;