Skip to content

Kirby 4.1.2

$field->isTrue()

Converts the field value into a proper boolean

$field->isTrue(): bool

Return type

bool

Example

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