Empty
2 min read
Jun 2, 2026
---
title: empty
autoseo:
enabled: true
theme: learn2
child_type: default
admin:
children_display_order: collection
visible: true
---
Empty Check:
empty — Returns true if var does not exist or has a value that is empty or equal to zero, aka falsey, see conversion to boolean. Otherwise returns false..
Basic Usage:{if $myVar is empty}it's an empty variable{/if}
{if $myVar|empty}it's an empty variable{/if}
{if empty($myVar)}it's an empty variable{/if}
Not empty Check:
{if $myVar is not empty}it's an not empty variable{/if}
{if $myVar|empty:'!'}it's an not empty variable{/if}
{if !empty($myVar)}it's an not empty variable{/if}
Leave a Comment