empty
Found a typo or an error? Want to improve this document? Edit it.
Need support or have a technical question? Post to the user mailing-list.
empty checks if a variable is empty:
1 2 3 4
{# evaluates to true if the foo variable is null, false, an empty array, or the empty string #} {% if foo is empty %} ... {% endif %}