Skip to content
This repository was archived by the owner on Nov 14, 2023. It is now read-only.
This repository was archived by the owner on Nov 14, 2023. It is now read-only.

Issue with $page->hasNextVisible() #41

@zvaehn

Description

@zvaehn

Hi,

I am currently facing the following issue.
The logic shown below works perfectly fine on the development site, but shows a very strange behavior in the static version.

What it should do: Generate a sibling link or if the current page is the last page in the sibling set, start from the first sibling.

What it actually does: Every page genereates a link which points to the very first page, this page points then correctly to the second one, but the second page points back to the first page.

// Get the next visible project
if($page->hasNextVisible()) {
  $nextUrl = $page->nextVisible()->url();
}
// Start from the beginning
else {
  if($siblings = $page->siblings(false)->visible()) {
    $nextUrl = $siblings->first()->url();
  }
}

Am i missing something or is this actually a bug?
Thanks for your help!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions