0

I want to make a list on every profile page of content that the user voted on.

I've yet only managed to show the current logged in user's votes, not the user from the profile page.

In other words, I need to pass the User ID from Contextual filters to the Filter criteria with VotingAPI.

I tried with the filter Votes: User, but I wasn't able to set Is one of: % as the username, which would've solved my problem.

6
  • 1
    What exactly is the problem? Contextual filters by definition should already filter your result set on the field for an entity you choose based on the value of the URL. Did you try setting up the contextual filter to filter on Votes: User? Or am I misunderstanding the problem?
    – 9ee1
    Feb 11, 2013 at 20:58
  • You're right. I set the filter as Votes: User with default value of User ID from URL and it worked. Thanks! :) Feb 11, 2013 at 21:14
  • Actually, it only works if the user in the URL is the logged in user, otherwise it shows no results. Feb 11, 2013 at 21:17
  • That's weird. Are you sure you don't have any other filters to filter by the logged in user. Filters will usually take precedence over contextual filters.
    – 9ee1
    Feb 11, 2013 at 21:19
  • Fixed it. I think I had a relationship with Restrict to current user checked :) Feb 11, 2013 at 21:31

1 Answer 1

1

Contextual filters by definition should already filter your result set on the field for an entity you choose based on the value of the URL.

Set up the contextual filter to filter on Votes: User and make sure you have no other filters or relationships that restrict your result for the logged in user.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.