How to setup a "Who's bookmarked this" tab

Last updated on
30 April 2025

Sometimes it is desired to add a tab to our node which will list all the users who bookmarked it (Or "favorited" it, or "hated" it, or whatever your flag stands for). Here's a recipe for doing this:

  1. Start a user-type view (as opposed to a node-type view).
  2. Add the "User: Name" field.
  3. Bring in the "Flags: User's flagged content" relationship. This step will link each user with all the nodes she has flagged (To be exact, not with her nodes but with her flaggings). By itself, this step is not very useful; so the next step is:
  4. Use the "Flags: Content ID" Argument to restrict the nodes (or the flaggings, to be exact) to the one having the node ID mentioned in the URL. Set your page URL to node/%/who (for example), and make it a tab.
  5. You may wish to add the "Flags: Flagged time" field to show, besides each user, the date she bookmarked the node. You may then style your view as a table and make it sortable by either user name or flagging time.

There's yet another way to build a "Who's bookmarked this" tab:

  1. Start a node-type view.
  2. Add the "Node: Nid" argument to filter the nodes to the one having the node ID mentioned in the URL. Set your page URL to node/%/who (for example), and make it a tab.
  3. Bring in the desired "Flags: Node flag" relationship.
  4. Bring in the "Flags: User" relationship.
  5. Add the "User: Name" field. Associate it with the flag relationship.
  6. Here, too, you may wish to add the "Flags: Flagged time" field to show, besides each user, the date she bookmarked the node.

And what about a block?

You now know how to set-up a "Who's bookmarked ..." tab. But what if you want a block, not a tab?

If your view work correctly, you can easily turn it into a block. Add a "Block" display. Since blocks don't get arguments from the URL, you'll have to add the "Node ID from URL" default argument. Lastly, enable your block (via "Administer >> Site building >> Blocks").

But what if it's not nodes that I'm flagging?

Indeed, this module lets you flag not only nodes but users and comments as well. The recipes above will work for these cases too. (You'll have to make some obvious adjustments to the second recipe.)

Help improve this page

Page status: Not set

You can: