I have a node that people can flag to indicate their attendance/interest in that node's activity. However, I would like to show a list of users who have flagged a given node on that node's page. While I can find a way to show a user's current flag state or a flag count for that node in a view, I can't find a way to do this for the node representation itself.
You can relatively easy do that by adding a views contextual filter for the node id (
nid) with the following configuration:
When the filter value is NOT in the URL:
Provide default value -> Content ID From URL
When the filter value is IN the URL or a default is provided:
Specify validation criteria ->Your CTs list
Filter value format:
The flag relationship used should be:
by any user
Of course you can use that view as a block and place it wherever you like.