"ഫലകം:If empty/doc" എന്ന താളിന്റെ പതിപ്പുകൾ തമ്മിലുള്ള വ്യത്യാസം
Content deleted Content added
Jackmcbarn (സംവാദം | സംഭാവനകൾ) →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
: <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|||||||||
| {{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.
|