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

XF 1.3 Change link in template

LPH

Well-known member
#1
I'm trying to change the sidebar_online_users template:

The following returns domain.com/members/user.number
PHP:
<a href="{xen:link members, $user}">
Instead, I want domain.com/community/members/user.number

If I change the php code to the following then only domain.com/community/members is returned and not the $user

PHP:
<a href="{xen:link /community/members, $user}">
How is the xen:link supposed to be changed to get the ,$user to follow in the URL?
 

Jeremy

Well-known member
#2
Your second line of code isn't a valid XenForo route, so it doesn't know how to handle $user. With members, it knows how to handle $user. Is your forum in a community sub-directory?
 

LPH

Well-known member
#3
Yes. I'm trying to modify the template so an external page from the forum will return the links properly. For example, sidebar shows on / and /community/members//lph.6 would be user.