Template:IfNotEmpty

From Puella Magi Wiki
Revision as of 00:34, 1 January 2023 by Celtic Minstrel (talk | contribs)
(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"