Template:Documentation
More actions
|
This template automatically displays a green documentation box like you are seeing now, and automatically loads the content from a /doc subpage. It can also load the content from other places if instructed to. It is intended for pages which are transcluded in other pages, i.e. templates, whether in the template namespace or not. Usage{{Documentation |1= }}
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, and categories. It also reduces server resources by circumventing a technical limitation of templates (see a developer's explanation). Normally this template is used without any parameters, placed at the bottom of the template or page being documented, within a <!--Last line of your template code--><noinclude>
{{Documentation}}
<!-- Add categories to the /doc subpage -->
</noinclude>
Then this template automatically loads the content from the /doc subpage of the template it is used on. This template can also load the content from any other page. Like this: <!--Last line of your template code--><noinclude>
{{Documentation |Template:Other page/doc}}
</noinclude>
Note that when loading the documentation from a page other than the local /doc page it becomes tricky to handle the categories. The content can also be fed directly as text. Like this: <!--Last line of your template code--><noinclude>
{{Documentation
| content =
(some documentation)
}}</noinclude>
When the Parameter <!--Last line of your template code--><noinclude>
{{Documentation |1=Template:Any page/doc
| content = {{Any page/doc |parameters}}
}}</noinclude>
Then the pagename fed as parameter 1 is used for the [edit] [purge] links and for the /doc link in the link box below the doc box. But the content parameter is used for the content shown in the doc box. The above code means that the content is transcluded as If the documentation page contains includeonly or noinclude tags as part of the documentation, replace the "<" with "<". Template parameters
Additional informationThe 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: all users Placement: At the bottom of the page See also
Localizationالعربية ∙ বাংলা ∙ català ∙ čeština ∙ Deutsch ∙ Zazaki ∙ English ∙ español ∙ eesti ∙ euskara ∙ فارسی ∙ suomi ∙ français ∙ galego ∙ עברית ∙ हिन्दी ∙ hrvatski ∙ magyar ∙ Bahasa Indonesia ∙ italiano ∙ 日本語 ∙ 한국어 ∙ македонски ∙ മലയാളം ∙ मराठी ∙ မြန်မာဘာသာ ∙ norsk bokmål ∙ Plattdüütsch ∙ Nederlands ∙ norsk nynorsk ∙ polski ∙ português ∙ português do Brasil ∙ русский ∙ slovenščina ∙ српски / srpski ∙ svenska ∙ ไทย ∙ Türkçe ∙ українська ∙ Tiếng Việt ∙ 中文 ∙ 中文(简体) ∙ 中文(繁體) This template makes use of {{Autotranslate}} and the translate extension. The layout of the template can be found under Template:Documentation/layout.
Additionally, this template makes use of Module:TNTFallback, Module:TNT and Data:I18n/Documentation.tab. | ||||||||||||||||||||||||||||||||||||||||||