Nodyn:Missing param
This template is Under development. |
This helper template provides a means of testing if a specified number of parameters are defined. It will test n parameters n is between 1 and 10. It is intended to be used in other templates.
Returns the a number which indicates the first undefined parameter or the empty string if all parameters are defined. n specifies the number of parameters expected.
Usage
{{missing param|n=4|1|2|3|4}} →
{{missing param|n=4|1| |3|4}} → 2
{{missing param|n=4|1|2|3| }} → 4
Examples
{{Error | {{#switch: {{missing param|n=3|1| |3}} | 1 = The 1st parameter is missing. | 2 = The 2nd parameter is missing. | 3 = The 3rd parameter is missing. | ... }} }}
→ The 2nd parameter is missing.
{{#if: {{missing param|n=3|1| |3}} | There is a missing parameter. | ... }}
→ There is a missing parameter.
See also
- {{Error}}
- {{Citation error}}
- {{If all}}
Mae'r ddogfennaeth uchod wedi ei thrawsgynnwys o Nodyn:Missing param/doc. (golygu | hanes) Gall golygyddion arbrofi yn y tudalennau pwll tywod (creu | drych) a testcases (creu). Os gwelwch yn dda, ychwanegwch gategorïau a rhyngwicis at yr is-dudalen /doc. Is-dudalennau'r nodyn hwn. |