In template.php you have to write
function template_preprocess_views_view(&$variables){
if($variables['name']=='my_view'){
$current_page=intval($variables['view']->get_current_page());
$items_per_page=intval($variables['view']->get_items_per_page());
$item_displayed_start=($items_per_page*$current_page)+1;
$item_displayed_end=($items_per_page*($current_page+1));
$total_items=intval($variables['view']->query->pager->total_items);
if($total_items==0){
$item_displayed_start=$total_items;
}
if($item_displayed_end>$total_items){
$item_displayed_end=$total_items;
}
$variables['displayed_items']="(Displaying $item_displayed_start - $item_displayed_end of $total_items)";
}
}
And use $displayed_items variable in views-view.tpl.php.

Post new comment