Skip to content

Kirby 6.0.0

$field->isTrue()

Checks if the field value is truthy

$field->isTrue(): bool

Return type

bool

Examples

<?php if ($page->cover()->isTrue()): ?>
<figure class="cover">
  <!-- Your code here -->
</figure>
<?php endif ?>