I would like to create a view that can display nodes based on their rating. I would like the rating to be a views argument.

Given a node type called "article", the path to the view would look like: "articles/%". For example, the url http://www.exampe.com/articles/5 would display articles whose rating are 5 or higher.

Unfortunately, it looks like the Voting API does not expose any arguments to the Views module. Can "Voting API results: value" be made an argument to Views?

Alternatively, is there some other way get this desired behavior out of Drupal?

I am using these modules:
votingapi-6.x-2.0-rc2
views-6.x-2.3
vote_up_down-6.x-1.x-dev

I am using Drupal 6.9

Comments

xnickmx’s picture

After some more experimenting, I figured out a way to get close to what I am looking for, but I am still not satisfied with it.

I can add a filter on "Voting API results: value" and then "expose" this filter. This adds a query param to the URL, so now it looks like http://www.example.com/articles?points=5. The only problem is that is puts a form field on the page where the user can set the filter value. I don't really like having the form field on the page, but don't know any other way to get this to work. If I hide the filter, then the query param is not used and only the hard-coded filter value is used.

Any suggestions would be much appreciated.

legolasbo’s picture

Issue summary: View changes
Status: Active » Closed (won't fix)

Drupal 6 is no longer supported. Closing old issues to clean up the issue queue.

Please reopen and update this issue if this is still an issue in the D7 or D8 version.