Skip to content

Kirby 3.5.7.1

$page->isOpen()

Checks if the page is open.

$page->isOpen(): bool

Return type

bool

Parent class

Kirby\Cms\Page

Example

<nav role="navigation">
  <ul>
    <?php foreach($pages as $subpage): ?>
    <li<?php e($subpage->isOpen(), ' class="active"') ?>>
      <a href="<?= $subpage->url() ?>">
        <?= html($subpage->title()) ?>
      </a>
    </li>
    <?php endforeach ?>
  </ul>
</nav>