$page->hasPrevListed()
Checks if there's a previous listed page in the siblings collection
$page->hasPrevListed(Kirby\Cms\Pages|null $collection = null): boolParameters
| Name | Type | Default | 
|---|---|---|
| $collection | Kirby\Cms\Pagesornull | null | 
Return type
bool
This method modifies the existing $page object it is applied to and returns it again.
Parent class
Examples
if ($page->hasPrevListed()) {
  echo $page->prevListed()->url();
}With collection as argument
$collection = $page->siblings()->listed()->sortBy('date', 'desc');
if ($page->hasPrevListed($collection)) {
  echo $page->prevListed($collection)->url();
}