$field->isEmpty()

Checks if the field is empty

  • return (boolean)

Example

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

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