$field->isNotEmpty()

Checks if the field is not empty

  • return (boolean)

Example

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

Is something missing or incorrect? Edit this page on Github…