How can I print the number of the current pager in Views template? I have a node View with pager configured Paged output, full pager, Items per page：30

So the view lists only 30 nodes per page.
Now I would like to print the number of the current page and the total number of pages on views template page-my-view.tpl.php.

For example, "2 / 10" when the current page is the 2nd one and the total number of the pages is 10.

How can I do this?
Global: Result summary is what you're looking for.

Simply add it into your HEADER or FOOTER wherever you need and then you're requirement is done.

$view = new view();
$view-&gt;name = 'demo';
$view-&gt;description = '';
$view-&gt;tag = 'default';
$view-&gt;base_table = 'node';
$view-&gt;human_name = 'Demo';
$view-&gt;core = 7;
$view-&gt;api_version = '3.0';
$view-&gt;disabled = FALSE; /* Edit this to true to make a default view disabled initially */

/* Display: Master */
$handler = $view-&gt;new_display('default', 'Master', 'default');
$handler-&gt;display-&gt;display_options['title'] = 'Demo';
$handler-&gt;display-&gt;display_options['use_more_always'] = FALSE;
$handler-&gt;display-&gt;display_options['access']['type'] = 'perm';
$handler-&gt;display-&gt;display_options['cache']['type'] = 'none';
$handler-&gt;display-&gt;display_options['query']['type'] = 'views_query';
$handler-&gt;display-&gt;display_options['exposed_form']['type'] = 'basic';
$handler-&gt;display-&gt;display_options['pager']['type'] = 'some';
$handler-&gt;display-&gt;display_options['pager']['options']['items_per_page'] = '10';
$handler-&gt;display-&gt;display_options['style_plugin'] = 'default';
$handler-&gt;display-&gt;display_options['row_plugin'] = 'fields';
/* Footer: Global: Result summary */
$handler-&gt;display-&gt;display_options['footer']['result']['id'] = 'result';
$handler-&gt;display-&gt;display_options['footer']['result']['table'] = 'views';
$handler-&gt;display-&gt;display_options['footer']['result']['field'] = 'result';
/* Field: Content: Title */
$handler-&gt;display-&gt;display_options['fields']['title']['id'] = 'title';
$handler-&gt;display-&gt;display_options['fields']['title']['table'] = 'node';
$handler-&gt;display-&gt;display_options['fields']['title']['field'] = 'title';
$handler-&gt;display-&gt;display_options['fields']['title']['label'] = '';
$handler-&gt;display-&gt;display_options['fields']['title']['alter']['word_boundary'] = FALSE;
$handler-&gt;display-&gt;display_options['fields']['title']['alter']['ellipsis'] = FALSE;
/* Sort criterion: Content: Post date */
$handler-&gt;display-&gt;display_options['sorts']['created']['id'] = 'created';
$handler-&gt;display-&gt;display_options['sorts']['created']['table'] = 'node';
$handler-&gt;display-&gt;display_options['sorts']['created']['field'] = 'created';
$handler-&gt;display-&gt;display_options['sorts']['created']['order'] = 'DESC';
/* Contextual filter: Content: Author uid */
$handler-&gt;display-&gt;display_options['arguments']['uid']['id'] = 'uid';
$handler-&gt;display-&gt;display_options['arguments']['uid']['table'] = 'node';
$handler-&gt;display-&gt;display_options['arguments']['uid']['field'] = 'uid';
$handler-&gt;display-&gt;display_options['arguments']['uid']['default_action'] = 'default';
$handler-&gt;display-&gt;display_options['arguments']['uid']['default_argument_type'] = 'user';
$handler-&gt;display-&gt;display_options['arguments']['uid']['default_argument_options']['user'] = FALSE;
$handler-&gt;display-&gt;display_options['arguments']['uid']['summary']['number_of_records'] = '0';
$handler-&gt;display-&gt;display_options['arguments']['uid']['summary']['format'] = 'default_summary';
$handler-&gt;display-&gt;display_options['arguments']['uid']['summary_options']['items_per_page'] = '25';
/* Filter criterion: Content: Published */
$handler-&gt;display-&gt;display_options['filters']['status']['id'] = 'status';
$handler-&gt;display-&gt;display_options['filters']['status']['table'] = 'node';
$handler-&gt;display-&gt;display_options['filters']['status']['field'] = 'status';
$handler-&gt;display-&gt;display_options['filters']['status']['value'] = 1;
$handler-&gt;display-&gt;display_options['filters']['status']['group'] = 1;
$handler-&gt;display-&gt;display_options['filters']['status']['expose']['operator'] = FALSE;
/* Filter criterion: Content: Type */
$handler-&gt;display-&gt;display_options['filters']['type']['id'] = 'type';
$handler-&gt;display-&gt;display_options['filters']['type']['table'] = 'node';
$handler-&gt;display-&gt;display_options['filters']['type']['field'] = 'type';
$handler-&gt;display-&gt;display_options['filters']['type']['value'] = array(
  'page' =&gt; 'page',
);
/* Filter criterion: Content: Author uid */
$handler-&gt;display-&gt;display_options['filters']['uid']['id'] = 'uid';
$handler-&gt;display-&gt;display_options['filters']['uid']['table'] = 'node';
$handler-&gt;display-&gt;display_options['filters']['uid']['field'] = 'uid';
$handler-&gt;display-&gt;display_options['filters']['uid']['value'] = '';
$handler-&gt;display-&gt;display_options['filters']['uid']['exposed'] = TRUE;
$handler-&gt;display-&gt;display_options['filters']['uid']['expose']['operator_id'] = 'uid_op';
$handler-&gt;display-&gt;display_options['filters']['uid']['expose']['label'] = 'Author UID';
$handler-&gt;display-&gt;display_options['filters']['uid']['expose']['operator'] = 'uid_op';
$handler-&gt;display-&gt;display_options['filters']['uid']['expose']['identifier'] = 'uid';
$handler-&gt;display-&gt;display_options['filters']['uid']['expose']['remember_roles'] = array(
  2 =&gt; '2',
  1 =&gt; 0,
  3 =&gt; 0,
);

/* Display: Page */
$handler = $view-&gt;new_display('page', 'Page', 'page');
$handler-&gt;display-&gt;display_options['path'] = 'demo/%';

/* Display: Attachment */
$handler = $view-&gt;new_display('attachment', 'Attachment', 'attachment_1');
$handler-&gt;display-&gt;display_options['pager']['type'] = 'some';
$handler-&gt;display-&gt;display_options['defaults']['fields'] = FALSE;
/* Field: Content: Author uid */
$handler-&gt;display-&gt;display_options['fields']['uid']['id'] = 'uid';
$handler-&gt;display-&gt;display_options['fields']['uid']['table'] = 'node';
$handler-&gt;display-&gt;display_options['fields']['uid']['field'] = 'uid';
$handler-&gt;display-&gt;display_options['displays'] = array(
  'page' =&gt; 'page',
  'default' =&gt; 0,
);
$handler-&gt;display-&gt;display_options['attachment_position'] = 'after';
$handler-&gt;display-&gt;display_options['inherit_exposed_filters'] = TRUE;