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.

  • 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 '13 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! :) – Alex Feb 11 '13 at 21:14
  • Actually, it only works if the user in the URL is the logged in user, otherwise it shows no results. – Alex Feb 11 '13 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 '13 at 21:19
  • Fixed it. I think I had a relationship with Restrict to current user checked :) – Alex Feb 11 '13 at 21:31
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, privacy policy and cookie policy

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