• Home
  • Random
  • Nearby
  • Log in
  • Settings
Donate Now If Wikipedia is useful to you, please give today.
  • About Wikipedia
  • Disclaimers
Wikipedia

Template:Is empty

  • Template
  • Talk
  • Language
  • Watch
  • View source
Template documentation[view] [edit] [history] [purge]
Not to be confused with Template:If empty.

Returns true if the first parameter is assigned no value. It can be useful in de-obfuscating wiki markup. It was created to facilitate adding tracking categories.

Usage

Logic
if not x then 1.
if x then <null>.

Examples

{{#if:{{is empty| }}|empty|not empty}} → empty

{{#if:{{is empty|value}}|empty|not empty}} → not empty

Without this template

{{#if: |not empty|empty}} → empty

{{#if:value|not empty|empty}} → not empty

The above documentation is transcluded from Template:Is empty/doc. (edit | history)
Editors can experiment in this template's sandbox (create | mirror) and testcases (create) pages.
Add categories to the /doc subpage. Subpages of this template.
Retrieved from "https://en.wikipedia.org/w/index.php?title=Template:Is_empty&oldid=1326750638"