I'm using the Content Profile module to create member profiles. I want the members to have an easy way of linking to their contact form when they fill out their profile. I can put in a link, but then they have to know their user number and enter the path...not the user-friendly experience I'm looking for.
I'm thinking there must be a way to do this by using the Node Reference field type, and using the option to use Views to select the node referenced. I'm not sure how to do this though. The pages already exist, in the form user/%/contact, so I don't need Views to create the pages...but I do need Views so that CCK/Content Profile knows which node to reference.
Any ideas on how I would set this up in Views, and what arguments I'd need to set in the field in CCK?
Comments
The contact form is not a
The contact form is not a node, so I think you'd need to grab the author id from the $node object and then create just create a link.
What I want is a small contact form rather than a link on the Content Profile page... and there I'm a bit stymied. I think you have to just build a new form.
link to contact form snippet
This is correct.
You can use this php snippet to Create a link to the contact form for the author of the node.
print '<a href="/user/'.$node->uid[0].'/contact">Contact Author'.'</a>';I think it is easiest to create a template for your content profile node type. If you are using a content type called profile, you would need to create a node template called node-profile.tpl.php and place this snippet inside it.