$page->prevInvisible([$sort, $direction])
Returns the previous invisble sibling.
-
$sort (string)
An optional sort field for the siblings -
$direction (string)
An optional sort direction -
return ($page)
Example
<?php if($prev = $page->prevInvisible()): ?>
<a href="<?= $prev->url() ?>">previous invisible page</a>
<?php endif ?>
Using sort field
<?php if($prev = $page->prevInvisible('title', 'asc')): ?>
<a href="<?= $prev->url() ?>">previous invisible page</a>
<?php endif ?>