I'm displaying a view on a pager with a mini pager. It has total number 15 pages.
I want to display page number 5 by default. The the next link will point to page number 6 and the previous link will point to page number 4.
I have tried the below code.
function mymodule_views_pre_execute(&$view) {
$view->query->pager->current_page = 5;
}
It just moves the page number in the page number, displaying it as page 5 of 15
but the views displaying the results of the page 1.
It it possible to set the default page number of a pager? How? I'm using ajax in views.