How to display a specific page number of a views mini pager? 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(&amp;$view) {
  $view-&gt;query-&gt;pager-&gt;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.
I have found the answer. I'm sharing here the solution.

I used the following code and it worked.

function mymodule_views_pre_build(&amp;$view) {
  $view-&gt;set_current_page(5);
}