On this page
Place a custom "Send a PM" link with Views, Panels
Last updated on
30 April 2025
Use case: I want to show a "Send a PM" link to a user, but I want to control the placement.
Possible solutions
Views
- Create a view of users and fields.
- Add a block.
- Set "User: Uid" as the contextual filter. "Hide view" when the filter is not available. When the filter is available "Specify validation criteria" to be "User" and "only allow numeric UIDs."
- Under the advanced settings, set argument input to "From context" and require the "User ID" from under User.
- Under fields, remove the user name and add a "Privatemsg: Send privatemsg link" field.
- Save the view.
You can now add this in the Block UI wherever you want.
Panels
Follow the same instructions as for Views above but in step 2, add a content pane instead of a block.
If you don't want to show the link on a user's own profile, you can adjust the visibility settings (in panels) to not show the link when the logged in user = viewed user.
Author Pane
Privatemsg integrates with the Author Pane module. A "Send a PM" link will be shown in each user's author pane.
Help improve this page
Page status: Not set
You can:
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