Jump to content

Template:para

From Wiktionary, the free dictionary

|{{{1}}}={{{2}}}


Usage

This template simply displays a parameter name between a vertical line and an equal sign, as is seen in template calls. (This is useful in template documentation and in talk page discussions of templates.)

To display a parameter name surrounded by {{{triple-braces}}} (as would appear in template code), use {{paramref}}.

Parameters

This template takes the following parameters:

  • |1= (may be empty if second parameter is present): the name of the parameter
  • |2= (optional if first parameter is present): a corresponding value for the parameter
  • |3= (optional): additional usage text
  • |req=1: indicate that the parameter is required
  • |opt=1: indicate that the parameter is optional
  • |list=1: indicate that the parameter is a list (i.e. accepts multiple values depending on the number appended to the end of its name)

Examples

Wikicode Result
{{para|name}} |name=
{{para|name|req=1}} |name= (required)
{{para|name|opt=1}} |name= (optional)
{{para|opt|1}} |opt=1
{{para||section}} |section
{{para|title|<var>book title</var>}} |title=book title
{{para|<var>parameter</var>|<var>value</var>}} |parameter=value
{{para|=|foo}} |=foo
{{para|2||''optional'' if first parameter is present}} |2= (optional if first parameter is present)
{{para|q|list=1}} |qN=
{{para|a|list=1|<var>audio file name</var>}} |aN=audio file name

When using literal, pre-specified values, simply provide the value (appearance as in example 4). When illustrating hypothetical, variable or user-definable values, use <var>value</var> (appearance as in example 6), and the same should be done for non-literal, example parameters (as in example 7).