Skip to content

Kirby 4.1.2

$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 ?>