As I mentioned earlier, if you'd like to utilize multiple Rate widgets in your view, you need to add a relationship for each one. Let's take a look at that by adding another filter to only show content that has been rated as "Useful".
- Advanced
- Click "Add" next to "Relationships"
- Choose "Content: Vote results"
- (Apply (all displays))
- Identifier: Useful (This will differentiate this relationship from the "Review" relationship.)
- [ ] Require this relationship (Again, we don't want to require this.)
- Value type: No filtering
- Vote tag: Usefulness
- Aggregation function: Average vote
- (Apply (all displays))
Now, we can filter to only show content that has been designated as useful.
- Click "Add" next to "Filter Criteria"
- Choose "Vote results: Value"
- (Apply (all displays))
- Relationship: Useful
- Operator: Is greater than or equal to
- Value: 0 (This will hide articles with a negative average rating.)
- (Apply (all displays))
Now, when we scroll down, our preview only shows content that has been rated with an average of at least 75% and positive usefulness rating! Again, this won't show brand new content, so you could add an OR filter like we did for the fivestar rating.
- Click "Add" next to "Filter Criteria"
- Choose "Vote results: Value"
- (Apply (all displays))
- Relationship: Useful
- Operator: Is empty (NULL)
- (Apply (all displays))
Now we need to add another "Or" filter group.
- Click the dropdown for "Filter Criteria"
- Click "And/Or, Rearrange"
- Click "Create new filter group"
- In the new group change the Operator to "Or"
- Drag both "Useful" filters to the new group
Now, the view will filter to content that is both published, and of the article content type, AND either not voted or has a rating of at least 75% AND either not voted or has a positive usefulness rating.
- (Apply (all displays))
- (Save) (Save the view)
Whew! As you can see, the options for how you want to use Ratings to affect your Views are pretty extensive!
In the next video, we'll take a step back from Views, and look at how we can disable a Rate widget after a specified amount of time or on a specific date and time.