Reference

Guide

$page->hasPrevUnlisted()

Checks if there's a previous unlisted page in the siblings collection

$page->hasPrevUnlisted(): bool

Return type

bool

Example

<?php
echo $page->hasPrevUnlisted(); //will echo 1 if true, nothing if false.
?>

Using sort field

<?php
echo $page->hasPrevUnlisted('date', 'desc'); //will echo 1 if true, nothing if false.
?>

Source code

kirby/src/Cms/PageSiblings.php#L82