Hello,
is any chance to have a link to users contact form from pages generated via Views? I added User Id field and use the following code

<a href="/contact_form/[uid]" title="Contact the author">contact</a>

to rewrite the output of this field, but content authors see this link too, which is no good.
Please advice.
Cheers

Comments

jenyum’s picture

Have you tried outputting the field as a link instead of rewriting the output? First, make sure you have uid as one of your fields (set to not display) then output the contact field (I just use the username for this) as a link with this link path:

user/[uid]/contact

Haven't tried it with this module yet, but it should work. Let me know if it works for you and I'll mark this closed.

itserich’s picture

Thanks this seems to work great for me!

For any novice users, set up the UID as a field in Views and then it can be used as a replacement token for fields lower down on the field list.

I chose UID and then User Name, changing the output to field as link: contact_form/[uid]

Note @ jenyum the ReadMe states the link path would be user/[uid]/contact_form

Only tried one email so far but thanks it worked! I am also surprised it was not already a module, seems very useful.

Thomas_Zahreddin’s picture

Status: Active » Fixed

seems fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.