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) {
| Comment | File | Size | Author |
|---|---|---|---|
| view_calc_hide_subtotal_on_single_page.patch | 630 bytes | zedzed |
Comments
Comment #1
karens commentedGood 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!
Comment #2
zedzed commentedYou're welcome