Skip to content

Kirby 4.5.0

$field->isNotEmpty()

Checks if the field content is not empty

$field->isNotEmpty(): bool

Return type

bool

Example

<?php if ($page->address()->isNotEmpty()): ?>
<h2>Address</h2>
<?= $page->address()->kirbytext() ?>
<?php endif ?>