views - how to add multiple vote results aggregate sort criteria

brad bulger - August 15, 2009 - 20:46
Project:Voting API
Version:6.x-2.x-dev
Component:Views Integration
Category:support request
Priority:normal
Assigned:Unassigned
Status:closed
Description

i would like to sort a view by the point total and the number of votes. (votes are cast using Vote Up/Down) for example, node A with a point total of 3 and 10 votes sorts above node B with a point total of 3 and 3 votes.

i can't see how to do this. in order to sort on the value of the point total, i have to define a "Node: Vote results" relationship and set the Aggregation function to "Total score", and then sort on "Vote results: Value". and though i seem to be able to then create a second Vote results relationship, i can't use it for sorting - i can't distinguish between the two.

what am i missing about how to use this? or is it actually something that can't be done?

#1

ChrisRut - October 1, 2009 - 01:09
Status:active» closed

Have a look at this step-by-step instructional videocast on lullabot: Building Views with Fivestar and VotingAPI
Should get you started.

#2

ChrisRut - October 1, 2009 - 01:10
Status:closed» fixed

#3

brad bulger - October 3, 2009 - 03:22

thanks. the key was the Label field in the relationship definition - setting each relationship up with a different Label value, those labels are then selectable in the Relationship select field when i add a Sort criterion. as usual, it's perfectly logical now that i understand it :)

#4

System Message - October 17, 2009 - 03:30
Status:fixed» closed

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

 
 

Drupal is a registered trademark of Dries Buytaert.