• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

XF 1.4 Getting Username URL Bit

Jeremy

Well-known member
#2
What template are you attempting to add this two? Do you have a user ID available in the data? Do you have the user name available in the data?
 

Jeremy

Well-known member
#4
If you are adding it for the current visitor:
HTML:
<xen:if is="{$visitor.user_id}"><a href="{xen:link members, $visitor}">Your Profile</a></xen:if>
That shoudl work.
 

Jeremy

Well-known member
#8
I'm assuming this is an add-on or custom add-on and you should be contacting the author for more support. You can manually create the link using just the $visitor.user_id variable, but without the route class building the link, you may get unexpected results.
 
#9
That sort of worked? I did this:
<a href="{xen:link trade, '', 'user_id={$visitor.username}'}"> Trade Reps Received</a>
But it has an extra "user_id=" in the URL and the username isn't formatted correctly.