I am using Drupal panopoly. For a node type, I am able to display the content of the node and some profile information about the author. I used Contexts for this. However now, I want to display the link to author's personal contact form. The link to the personal contact form shows up on the View profile page. I need to add a direct link to the Contact Form from the node display page. How do I do this?
3 Answers
You can use the Drupal core Contact module to do exactly that.
EDIT: In conjuction with Menu Tokens, you will be able to add a menu entry that pulls in the current user id. Add this to your path when creating a menu link:
user/[user:uid]/contact
You'll need to enable "Use tokens" and select "User from context" in the Methods for Users dropdown. See screenshot:
-
I have used the contact module. And the contact form works fine. What I need is a direct Link to a user contact form, in the sidebar. For example if I am reading content from one author, I should be able to click on the link in the sidebar to directly go to that authors contact form page. Currently I can get the via the profile view page.– joe33Commented Sep 13, 2013 at 7:09
-
@joe33, I've got this working using the new info in my answer. Commented Sep 13, 2013 at 13:12
-
How would this link be made without using a menu? I'm trying to do something similar but it requires a Contact Information block with a phone number, address and a link to the node author's personal contact form. Commented Oct 30, 2014 at 19:53
I found that I was looking at this the wrong way to create a personal user contact form.
I am pretty sure what you described your requirement is a form that users can send each other messages from.
The answers with the menu token doesn't work because you get your ID with user/[user:uid]/contact but you need the user:uid of the user you want send a message. Best is use Privatemsg work great