Template documentation (for the above template, sometimes hidden or invisible) [view] [edit] [history] [refresh]
- Description
- This template is used to insert descriptions on template pages.
- Syntax
- Type
<noinclude>{{documentation}}</noinclude>
at the end of the template page.
General usage
On the Template page
Template code<includeonly>Any categories to be inserted into articles by the template</includeonly><noinclude> {{t|documentation}}</noinclude>
Note that, depending on the template, you may need to add a clear or complete a table/div just before {{documentation}}
is inserted (within the noinclude tags).
The line break is also useful as it helps prevent the documentation template "running into" previous code.
On the Template/doc page
For documentation i18n, see Project:Coding_conventions#Documentation i18n.
For translation guidance, see Project:I18n#Translation.
;{{#invoke:I18n|getMsg|Documentation|description}} :This template is used to do something. ;{{#invoke:I18n|getMsg|Documentation|syntax}} :Type {{t|for}} somewhere. ;{{#invoke:I18n|getMsg|Documentation|sample_output}} :{{#invoke:I18n|getMsg|Documentation|sample_output-text|{{t|for|foo|Template:Documentation}}}} : {{for|foo|Template:Documentation}} <includeonly>Any categories for the template itself</includeonly><noinclude>[[Category:Template documentation|{{PAGENAME}}]]</noinclude>
gives...
- Description
- This template is used to do something.
- Syntax
- Type {{for}} somewhere.
- Sample output
- {{for|foo|Template:Documentation}} gives...
- For foo, see Template:Documentation.
Any categories for the template itself
Use any or all of the above description/syntax/sample output sections. You may also want to add "see also" or further usage information sections.
Dependencies
- template:Documentation/editintro
- Template:Documentation/preload
- MediaWiki:Custom-languages-notice
- MediaWiki:Lang and MediaWiki:Lang/xx
- Module:Languages
- mw:Extension:Variables
Translation
- The template translations are stored at:
- Module:Documentation/i18n
The above text is transcluded from Template:Documentation/doc; you can change it or view its history. (How does this work?)
If you're done making changes, please refresh the text. (Why?)
You can experiment in this template's sandbox (create | mirror ) and testcases (create) pages.
Please add categories and interwikis to Template:Documentation/doc. (View all subpages of this page.)
If you're done making changes, please refresh the text. (Why?)
You can experiment in this template's sandbox (create | mirror ) and testcases (create) pages.
Please add categories and interwikis to Template:Documentation/doc. (View all subpages of this page.)