"ഫലകം:If empty/doc" എന്ന താളിന്റെ പതിപ്പുകൾ തമ്മിലുള്ള വ്യത്യാസം

→‎Examples: add scary warning
imported>Codehydro
no longer limited
വരി 6:
This is the {{tl|if empty}} template.
 
*''Update 2014 Dec 23'': This template used to only take 9 parameters. This limit has been removed.
This template is used inside other templates. It takes up to nine parameters (unnamed parameters 1-9) and returns the first found to be defined and non-empty. If none is found, nothing is returned. Typical usage is like this:
 
This template is used inside other templates. It takes upany tonumber nineof parameters (unnamed parameters 1-9) and returns the first found to be defined and non-empty. If none is found, nothing is returned. Typical usage is like this:
: <code><nowiki>{{if empty |{{{logo|}}} |{{{image|}}} |{{{picture|}}} |default.svg}}</nowiki></code>
: <nowiki>("Return {{{logo|}}} if it has a value, else {{{image|}}} if it has a value, else {{{picture|}}} if it has a value, else return "default.svg".")</nowiki>
Line 39 ⟶ 41:
| {{tlc|if empty||two|three|four}} | {{if empty||two|three|four}} |
| {{tlc|if empty||two||four}} | {{if empty||two||four}} |
| <code><nowiki>{{if empty|||||||||nine|ten}}</nowiki></code> | {{if empty|||||||||nine|ten}} | Unlike in previous versions, this template is no longer limited by 9 parameters.
| <code><nowiki>{{if empty||||||||||ten}}</nowiki></code> | {{if empty||||||||||ten}} | Empty string returned if maximum of nine parameters exceeded.
| {{tlc|if empty|}} | {{if empty|}} | The only parameter is empty or undefined, so returns an empty string.
| {{tlc|if empty||||}} | {{if empty||||}} | Returns an empty string.
"https://ml.wikipedia.org/wiki/ഫലകം:If_empty/doc" എന്ന താളിൽനിന്ന് ശേഖരിച്ചത്