Closed slisznia closed 9 years ago
I believe you can use the length filter for this:
{% if ($x|length == 0) %} ... {% endif %}
Even if {$x} is undefined the filter will yield 0. Can use "length" or the "len" alias. Also just as a warning, the == test is for string equality.
On occasion, I'd like to test if a container is empty using if-directive instead of inside a loop-directive's onEmpty. Is it possible to do this in Chunk?