Template:IfNotEmpty: Difference between revisions
Jump to navigation
Jump to search
(Created page with "<includeonly>{{{{{|safesubst:}}}{{{{{|safesubst:}}}#if:{{{1}}}|/P1|/p2}}|{{{2}}}|{{{3|}}}}}</includeonly><noinclude> This provides a way to check if a value is empty without s...") |
(No difference)
|
Revision as of 00:32, 1 January 2023
This provides a way to check if a value is empty without stripping whitespace from the "then" and "else" text.
Comparison:
- {{IfNotEmpty|x| p | q }} gives " p "
- {{IfNotEmpty|| p | q }} gives " q "
- {{#if:x| p | q }} gives "p"
- {{#if:| p | q }} gives "q"