Reference

Guide

$page->isUnlisted()

Checks if the page has no sorting number

$page->isUnlisted(): bool

Return type

bool

<?php if($page->isUnlisted()): ?>
  // redirect to error page
  <?php go('error') ?>
<?php endif ?>

Source code

kirby/src/Cms/Page.php#L791