Skip to content

Kirby 5.0.2

$field->isTrue()

Converts the field value into a proper boolean

$field->isTrue(): bool

Return type

bool

Examples

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