I can easily set up views that show nodes and related notes flagged by the current user, but I'm having a really hard time listing notes that were flagged by an arbitrary user. Here's my use case:
On the user profile, there's a new tab, "Bookmarks." That tab is provided by Views, and shows the user's bookmarked nodes (path: user/XX/bookmarks).
My view is set to use the User ID from the path as a contextual filter (argument), and I tried setting up some flag relationships to display nodes flagged by the user ID in the path, but I can only get the view to show nodes flagged by the current user (the user viewing the view).
I found #875726: Display nodes which were flagged by user you follow for 6.x-2.x, but that references a default view which is not available for the 7.x branch of flag.module...
Can I set something like this up in 7.x, or is this functionality not available?
Comments
Comment #1
geerlingguy CreditAttribution: geerlingguy commented...in that issue, vegeneric commented:
However, I can't figure out a way to do this :-/
Comment #2
ShadowMonster CreditAttribution: ShadowMonster commentedGo by this tutorial: http://drupal.org/node/326580 you need set it similar for users.
Comment #3
geerlingguy CreditAttribution: geerlingguy commentedOkay, it looks something like this, then (thanks for the link, ShadowMonster!):
This will allow you to display content flagged by a given user, based on the UID value in the URL, like at
user/[uid]/flags
.Works great, but takes a bit to wrap my mind around the relationships and how they interact with the views query! I didn't think to add two flag relationships...
I've added a comment to http://drupal.org/node/326580, though that documentation is for 6.x...
Comment #4
arlingtonvoicellc CreditAttribution: arlingtonvoicellc commented#3 works great in Drupal 7! Thanks!
Comment #5
siva.thanush CreditAttribution: siva.thanush commentedHow do I make it work for anonymous user.
I am using Session API for the anonymous user to come and flag in my site.
But how Do I show him the node he has flagged for this session.
Comment #6
hubert_r2 CreditAttribution: hubert_r2 commentedIs there a way to achieve this with a view created from a search API index?
All the relationships/contextual filters describe in #3 (which work great for a regular view) don't seem to be available with a search api view...