Toggle menu
24.1K
669
183
158.5K
HausaDictionary.com | Hausa English Translations
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Template:Parameter count

Template page
Revision as of 00:02, 19 January 2016 by Admin (talk | contribs) (2 revisions imported)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Template to find number of parameters. For example, if the template is called with three parameters, like this: {{Parameter count|x|y|z}} then it shows "three". If there are no parameters, it shows "zero". If there are five or more, it shows "five". It only counts up to the first nonblank parameter, and ignores it and all parameters after it.

This template is used by the verb template.

Example usage:

{{#switch:{{Parameter count | {{{1| }}} | {{{2| }}} | {{{3| }}} | {{{4| }}} | {{{5| }}} {{{6| }}}}}
       |zero=text to be displayed for zero parameters
       |one=text to be displayed for one parameter
       |two=text to be displayed for two parameters
       |three=text to be displayed for three parameters
       |four=text to be displayed for four paramters
       |five=text to be displayed for five parameters
       |six=text to be displayed for six parameters
       |This text is never displayed; it only counts up to six.}}