Doc/Template – Template

From Bohemia Interactive Community
Revision as of 01:57, 5 January 2021 by Lou Montana (talk | contribs) (Template creation)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Documents and categorises a Template.

Usage

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

  • name: (Optional, default {{PAGENAME}}) template name
  • descr: template text description
  • arg#: (# = number range 1..10) argument name
  • descr#: (# = number range 1..10) argument 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}}

Usage

{{Doc/Template}}

{{Doc/Template
| name = MyTemplate
| descr = Template description
| arg1 = argument1
| descr1 = this is the first argument
| arg2 = argument2
| descr2 = (Optional) this is the second argument
}}
Template description

Usage

{{MyTemplate|argument1|argument2}}

  • argument1: this is the first argument
  • argument2: (Optional) this is the second argument


{{Doc/Template
| name = MyTemplate
| descr = Template description
| arg1 = argument1
| descr1 = this is the first argument
| arg2 = argument2
| descr2 = (Optional) this is the second argument
| example1 = {{MyTemplate|Hello there!}}
| result1 = {{MyTemplate|Hello there!}}
}}
Template description

Usage

{{MyTemplate|argument1|argument2}}

  • argument1: this is the first argument
  • argument2: (Optional) this is the second argument
Examples
Code Result
{{MyTemplate|Hello there!}} Hello there!