Making member name clickable
mrtoner - October 24, 2007 - 07:05
| Project: | Site User List |
| Version: | 5.x-1.x-dev |
| Component: | Miscellaneous |
| Category: | support request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed |
Jump to:
Description
What am I doing wrong here? Instead of using the View User Column, I want to make a member's name (a Profile field) clickable -- taking me to the user's profile. This works well when I'm using the User ID, but not when using the User Name. That is, a template of
<a href="user/@uid">@profile_real_name</a>
produces a valid link, but
<a href="user/@name">@profile_real_name</a>
produces a link like domain.com/user/@name
Don

#1
one suggestion use l() function instead of <a> tag it will be useful while you use pathauto and other seo modules
#2
Well, I don't know what I'm doing, so when I used
return l("@profile_real_name", "user/@name")as an eval'd template, it didn't work. However, I learned something about Site User List that I didn't know. When I made User Name (with a template of "@name") a hidden field instead of a "not displayed" field, @name was substituted in the template for Real Name:
<a href="user/@name">@profile_real_name</a>So, the appropriate field being substituted must be used or hidden in the list. Hope that makes sense.
Don