On this page
How to add a "Who's bookmarked this" box to a panel
This recipe shows how to list, in a panel responsible for showing a node, all the users who bookmarked this node.
Alternatively, you can use this same recipe for showing, in a panel responsible for showing a user profile, all the nodes this user has bookmarked. You'll have to make some obvious adjustments to this recipe, however.
As mentioned previously, the way to produce a list of flagged content is by using Views.
Therefore, there are two parts to this recipe: setting up a view, and embedding this view in a panel.
Settings up a view
If your panel is responsible for showing a node, you'll have to set up a view that gets as an argument the Node ID and lists all the users who flagged it. See instructions for Drupal 6, and for Drupal 5.
Alternatively, if your panel is responsible for showing a user profile, you'll have to set up a view that gets as an argument the User ID and lists all the nodes this user has flagged. See instructions for Drupal 6, and for Drupal 5.
Make sure to test your view.
Embedding the view in a panel
- Say you have a panel that governs the
node/%URL. You want to add a "Who's bookmarked this" pane to it. - In the "Context" settings tab of your panel you probably have a "Node ID" argument.
- Make sure the "Views panes" module is enabled.
- Go to Views panes administration page and "Create panel view" out of the aforementioned view.
- In the new configuration page you'll be led to, note the "Argument: Node: ID" fieldset. This is how the panel's argument is connected with the view's argument. Things might work if you leave this configuration as-is, but it's safer to be more explicit here: if the Argument source dropdown is "From context", set the Required context dropdown to "Node".
- Go to the "Content" settings tab of your panel, and click the [+] of the pane where you wish to add the view. In the new mini-window that will open, under Views, you'll find the view you've just configured. Click it.
You're done.
Help improve this page
You can:
- Log in, click Edit, and edit this page
- Log in, click Discuss, update the Page status value, and suggest an improvement
- Log in and create a Documentation issue with your suggestion