Reference

Guide

$page->hasNextListed()

Checks if there's a next listed page in the siblings collection

$page->hasNextListed(\Kirby\Cms\Collection|null $collection = null): bool

Parameters

Name Type Default Description
$collection Kirby\Cms\Collection|null null

Return type

bool

Example

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

Using sort field

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

Source code

kirby/src/Cms/PageSiblings.php#L24