It would be great to be able to display the summary at the top of the table.

CommentFileSizeAuthor
#5 Views Summarize global options.png35 KBoadaeh

Comments

lunk rat’s picture

One way to achieve this is to create a duplicate display and set the Summarized Table plugin settings to "Display the summary row only". Then insert this view into the header of your view using Header > Global (view area). You could then change your main view to a normal Views table display plugin (if you don't want summaries at the bottom, too).

Or create an identical attachment display with "Display the summary row only" and attach it to the top of your view.

lunk rat’s picture

Alternatively, you can copy views-summarize-views-tablesummarized.tpl.php from the module directory into your theme's templates folder and move the summary row to the top of the rendered table.

oadaeh’s picture

Version: 7.x-1.1 » 7.x-2.x-dev
Component: Miscellaneous » Code
Assigned: Unassigned » oadaeh
Issue summary: View changes

I'm going to add this feature, but in the 7.x-2.x branch. I played around with it a bit and it was not too difficult to do.

  • oadaeh committed 39f25b0 on 7.x-2.x
    Issue #1988368 by oadaeh: Display summary at the top of the table
    
oadaeh’s picture

Assigned: oadaeh » Unassigned
Status: Active » Fixed
StatusFileSize
new35 KB

The commit adds two options to the Style options dialog, beneath the "Display the summary row only" option (now labeled "Views Summarize: Display the summary row only"): one for displaying the summary above the data (labeled "Views Summarize: Display the summary above the data"), and one for displaying it below the data (labeled "Views Summarize: Display the summary below the data"). (See the attached image.) The defaults are for displaying the summary below the data.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

johnpitcairn’s picture

Could this be added to 8.x as well please?

oadaeh’s picture

Yes, I'm adding it to the new 2.0.x that I have yet to publish. I just need to finish getting the functionality to match what is in 7.x-2.x and clean up the code, then I'll release it. I got a little busy and haven't had the time to finish it up.