Doc/Template – Template

From Bohemia Interactive Community
Revision as of 01:51, 15 January 2021 by Lou Montana (talk | contribs) (Add Template:TemplateCase usage)
Jump to navigation Jump to search

Documents and categorises a Template. To be used within <noinclude></noinclude> tags, e.g:

<includeonly>*template's code*</includeonly><noinclude>{{Doc/Template
| ...
}}
</noinclude>

Usage

{{Doc/Template|name|descr|param#|descr#|example#|result#}}

  • name: (Optional, default {{PAGENAME}}) template name
  • descr: template text description
  • param#: (# = number range 1..10) parameter name
  • descr#: (# = number range 1..10) parameter description
  • example#: (# = number range 1..5) mediawiki code example - to be wrapped between nowiki tags! (e.g <nowiki>{{Doc/Template}}</nowiki>)
  • result#: (# = number range 1..5) mediawiki code result - identical to example#, less nowiki tags (e.g {{Doc/Template}})
Examples
Code Result
{{Doc/Template}}

This template is used on these pages.

Usage

{{Doc/Template}}



{{Doc/Template
| name = MyTemplate
| descr = Template description
| param1 = parameter1
| descr1 = this is the first parameter
| param2 = parameter2
| descr2 = (Optional) this is the second parameter
}}
Template description

This template is used on these pages.

Usage

{{MyTemplate|parameter1|parameter2}}

  • parameter1: this is the first parameter
  • parameter2: (Optional) this is the second parameter



{{Doc/Template
| name = MyTemplate
| descr = Template description
| param1 = parameter1
| descr1 = this is the first parameter
| param2 = parameter2
| descr2 = (Optional) this is the second parameter
| example1 = <nowiki>{{MyTemplate|Hello there!}}</nowiki>
| result1 = {{MyTemplate|Hello there!}}
}}
Template description

This template is used on these pages.

Usage

{{MyTemplate|parameter1|parameter2}}

  • parameter1: this is the first parameter
  • parameter2: (Optional) this is the second parameter
Examples
Code Result
{{MyTemplate|Hello there!}} Hello there!