don't print sub total for one page result
zedzed - April 23, 2009 - 14:53
| Project: | Views Calc |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed |
Jump to:
Description
hi,
Sub total it's good functionality, but when view render has only one page, subtotal has the same data as total.
The sub total could be hidden.
this code works :
(file theme.inc, function template_preprocess_views_calc_table, line 163)
if($view->total_rows > $view->pager['items_per_page']) {
$process_available = array('sub_totals', 'totals');
}else{
$process_available = array('totals');
$vars['sub_totals'] = array(); //if don't set, error in template
}and replace line 165
foreach (array('sub_totals', 'totals') as $process) {by
foreach ($process_available as $process) {| Attachment | Size |
|---|---|
| view_calc_hide_subtotal_on_single_page.patch | 630 bytes |

#1
Good idea, committed. You didn't get a commit acknowledgment because I'm still learning how to do this on a Mac and I couldn't get the message working right, but thanks!
#2
You're welcome
#3
Automatically closed -- issue fixed for 2 weeks with no activity.