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

Better examples.
Intermediate save.
വരി 4:
This is the {{tl|ifempty}} template.
 
This is a meta-template that is used inside other templates. toIt helptakes themseveral detectparameters and handlereturns boththe emptyfirst andone undefinedof parametersthem thethat sameis waydefined (not null) and not empty.
 
=== Usage ===
 
Old usage that sometimes fail:
<pre>
[[image:{{{logo|{{{image|default.png}}}}}} | 100px ]]
</pre>
 
This will fail if ''logo'' or ''image'' is empty but defined, for instance if a template is called like this: <code><nowiki>{{template|logo=}}</nowiki></code>
 
Using {{tl|ifempty}} solves this:
 
<pre>
[[image:{{ifempty | {{{logo|}}} | {{{image|}}} | default.png }} | 100px ]]
</pre>
 
 
 
 
=== Examples ===
"https://ml.wikipedia.org/wiki/ഫലകം:If_empty/doc" എന്ന താളിൽനിന്ന് ശേഖരിച്ചത്