0

Can we show the result summary like "Displaying X to Y of Z records" while using the "table" or "tableselect" themes? I mean just the thing we do in views header/footer using the "Global: Result summary" option.

Hope I am clear with the requirement.

1 Answer 1

0

On your theme's template.php override the theme_pager function as below.You need to do some HTML customization as per your need.Hope this helps.

function themename_pager(&$variables){

$element = $variables['element'];
global $pager_page_array, $pager_total, $pager_total_items, $pager_limits;

$pager_current = $pager_page_array[$element] + 1;
$pager_max = $pager_total[$element];
$total_items = $pager_total_items[$element];
$limit = ($pager_limits[$element])?$pager_limits[$element]:10;

$start = ($pager_current-1)*$limit+1;
$end = ($pager_max != $pager_current)?$pager_current*$limit:$total_items;

$text = "$start to $end of $total_items Records";
return $text.theme_pager($variables);
}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.