is_blank Modifier

Returns true if the string contains only whitespace chars.

ghost:
zombie: BRAINSSSS
{{ if ghost | is_blank }}
{{ if zombie | is_blank }}
@if (Statamic::modify($ghost)->isBlank()->fetch()) @endif
@if (Statamic::modify($zombie)->isBlank()->fetch()) @endif
true
false
Docs feedback

Submit improvements, related content, or suggestions through Github.

Betterify this page →