$page->hasPrev([$sort, $direction])

Checks if the page has a previous sibling

  • $sort (string)
    An optional sort field for the siblings
  • $direction (string)
    An optional sort direction
  • return (boolean)

Example

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

Using sort field


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