Is Empty Modifier
Checks to see if an array is empty without any set values. Works with numeric indexes, associative, and string keyed arrays of all depths. It's pretty smart, as these things go.
some_data: - is living heremore_data: with: hopes: and: dreams: -
{{ if some_data | is_empty }}{{ if more_data | is_empty }}
@if (Statamic::modify($some_data)->isEmpty()->fetch()) ... @endif@if (Statamic::modify($more_data)->isEmpty()->fetch()) ... @endif
falsetrue
Docs Feedback
Submit improvements, related content, or suggestions through Github.
Betterify this page