Template:Documentation/doc: Difference between revisions
More actions
No edit summary |
No edit summary |
||
| Line 22: | Line 22: | ||
|type= | |type= | ||
|example= | |example= | ||
|i18n-method= | |i18n-method=autotranslate | ||
|i18n-desc= | |i18n-desc= | ||
|i18n-mediawiki-msg= | |i18n-mediawiki-msg= | ||
| Line 31: | Line 31: | ||
|shorthand= | |shorthand= | ||
|relieson= | |relieson= | ||
}} | }}<includeonly> | ||
<includeonly> | |||
[[Category:Template documentation| ]] | [[Category:Template documentation| ]] | ||
[[Category:Template namespace templates|{{PAGENAME}}]] | [[Category:Template namespace templates|{{PAGENAME}}]] | ||
Revision as of 15:29, 21 September 2011
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
{{documentation |1= |heading= }}
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).
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 "<".
Template parameters
| Parameter | Description | Default | Status | |
|---|---|---|---|---|
1 | title | The page mentioned above, the suffix /doc | optional | |
heading | change the text of the "documentation" heading. If this is set to blank, the entire heading line (including the first [edit] link) will also disappear. 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 page mentioned above, the suffix /doc | optional | |
Additional information
The template is intended to be used in the following namespaces: the Template namespace
The template is intended to be used by the following user groups: no user group specified
Placement: At the bottom of the page
See also
Localization
This template is localized through {{Autotranslate}}. The layout of the template can be found under Template:documentation/layout.
To add your language to the list of languages supported by this template, please copy the code of Template:documentation/en (or any other language version you prefer to translate) and replace the text strings in there (the form below can be used to create a translation, the English version is preloaded in the edit box). Please change the parameter lang from en (or whatever language you are translating) to the language code of your language.