Template: Documentation

From New World Encyclopedia
Revision as of 05:22, 13 June 2008 by Svemir Brkic (talk | contribs) (Fix noinclude)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
[edit] Template-info.svg Template documentation
Information icon.svg This template employs intricate features of template syntax.
Please do not alter it unless you understand its setup and parser functions and are ready to repair or revert all collateral damage if results are unexpected.
Any experiments should be conducted and all improvements tested in either the template sandbox or your user space before changing anything here.

{{#invoke:Message box|ambox}}

This template automatically displays a documentation box like you are seeing now, of which the content is transcluded from another page. It is intended for pages which are transcluded in other pages, i.e. templates, whether in the template namespace or not.

Usage

<noinclude>{{documentation}}<noinclude>
or <noinclude>{{documentation|template:any page}}<noinclude>

This code should be added at the bottom of the template code, with no extra space before "<noinclude>" (which would cause extra space on pages where the template is used). The parameter can be used as shown above to transclude an arbitrary documentation page.

Add categories and interwiki links to the documentation page inside includeonly tags.

If the documentation page contains includeonly or noinclude tags as part of the documentation, replace the "<" with "&lt;."

Functions

If the documentation page doesn't exist, the "edit" link includes a preload parameter so that clicking it will pre-fill the edit form with the basic documentation page format. The header depends on the namespace; for example, it will display "Template documentation" in the template namespace.

Rationale

This template allows any page to use any documentation page, and makes it possible to protect templates while allowing anyone to edit the template's documentation, categories, and interwiki links. It also reduces server resources by circumventing a technical limitation of templates (see a developer's explanation).

See also

Credits

New World Encyclopedia writers and editors copied and adjusted this Wikipedia template in accordance with New World Encyclopedia standards. This article abides by terms of the Creative Commons CC-by-sa 3.0 License (CC-by-sa), which may be used and disseminated with proper attribution.The history of earlier contributions by wikipedians is accessible to researchers here:

The history of this article since it was imported to New World Encyclopedia:

Note: Some restrictions may apply to use of individual images which are separately licensed.