Wrong url after pagination

I try to use pagination to show one subpage at time.

$subpages   = $page->children()->paginate(1);

first page url looks like this:

localhost:8888/workshops

next page looks like this:

localhost:8888/workshops/page:2

when i now try to use the main navigation i get an URL like this:

localhost:8888/workshops/team

instead of:

localhost:8888/team

anyone knows how to fix this?
Thanks!
Flo

How does your code for the navigation look like?

it is the basic navigation from the example.
But your question solved my problem. I always looked at the submenu which uses:

$p->url()

But the main Menu uses

$p->id()

changing this to url() solved the problem.
Thanks!

1 Like

That was my guess, that’s why I asked :smiley: