Template:Template doc/doc

From MeritBadgeDotOrg

Revision as of 03:53, September 30, 2007 by RWSmith (Talk | contribs)
(diff) ←Older revision | Current revision (diff) | Newer revision→ (diff)
Jump to: navigation, search

{{#ifeq: Template doc/doc | Template doc/doc

|
|  
This is the documentation page for Template:Template doc/doc.
When viewed directly, links using variables may appear broken; do not replace these with hard-coded page names or URLs.


}}

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:

Template:Colors<noinclude>
 <!--
     PLEASE DO NOT ADD DOCUMENTATION/CATEGORIES/INTERWIKIS HERE
 -->
 {{Template doc}}
 <!--
     MAKE ADDITIONS TO THE /doc SUBPAGE INSTEAD, THANKS
 -->
 </noinclude>

Make sure the opening <noinclude> 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 {{editprotected}} on the template’s talk page. If documentation, categories and interwiki links already exist in a section enclosed within a <nowiki> 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:Template doc/Preload (talk, backlinks, edit) is preloaded.

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

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 &#124;<code> instead.

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

See also


Personal tools
language