In the $_session
I can see this value. It is 4 and this is the correct pagination page number. That key is hard to use because of the hash number.
[pages.3013f9fce33116fecffe64915c48ac2c91e00d49] => 4
I bet there is a better way to get the panel pagination current page number?
Update
There is a get variable as well but that is not always visible. In some cases the panel relys in the session only.
Update 2
This seems to work:
$children = $this->page->children();
$children = $children->paginated('sidebar');
$pagination = new Snippet('pagination', array(
'pagination' => $children->pagination(),
'nextUrl' => $children->pagination()->nextPageUrl(),
'prevUrl' => $children->pagination()->prevPageUrl(),
));
print_r($pagination->{'_data'}['pagination']->page());
But this is very ugly:
print_r($pagination->{'_data'}['pagination']->page());
Any way of doing it nicer?