1

I have a custom content type named Movie.

Every user must have 2 lists of movies:

  • Seen movies

  • Not seen movies

For this purpose, I am using the Flag module to attach 2 links ("Seen" and "Unseen") on every movie page; with those, users can add the corresponding movie to their list.

I successfully made the two lists using the Views modules; users can see them when they are logged-in.

What I need is allowing users to see the movie lists of other users. How can I achieve this?

The "seen" and "unseen" lists should be mutually exclusive; if a movie is in the "Seen" list for user A, it cannot simultaneously be in the "Unseen" list for the same user.

How can I do this? Is there any other module, apart the Flag module, that could help me?

I am using Drupal 7.

1
  • 1
    Can't you use a single flag for this? Flagged = seen; not flagged = not seen.
    – AKS
    Commented Oct 17, 2012 at 2:55

1 Answer 1

1

Rather than using a filter like "current user" which would display uniquely for the logged in user, you will need to attach the view to each members profile with a "contextual filter" (under advanced on the right hand side). Use "User: Uid", then select"Provide default value" and "User ID from URL".

The above will mean that each view is unique to the user profile and any user can see another users list by going to their profile page.

2
  • Thank you.It worked using contextual filter , but before doing this a relationship with user had to be added... Btw, i didnt find these options ,"then select"Provide default value" and "User ID from URL"."
    – Azad Salam
    Commented Apr 12, 2012 at 5:24
  • Ahh a relationship with user will probably do a very similar thing. Glad to hear it is working.
    – WestieUK
    Commented Apr 12, 2012 at 7:37

Your Answer

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

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