Template:IfNotEmpty

From Puella Magi Wiki
Revision as of 00:32, 1 January 2023 by Celtic Minstrel (talk | contribs) (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...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

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"