$pages->current() always returns home page

Hello,

when I’m on a page other than ‘home’, shouldn’t

$pages->current();

return the current page object rather than the homepage, or am I missing something? :thinking:

kirby 3.9.8-rc.1

PS, what I’d like to know, is $pages->current() the same as $page ?

No, that method is from the Iterator class. It returns the element the array pointer points to, which is by default set to the first element of the given array.

With the page() helper (without parameter) or $page you get the current page object. What do you want to achieve?