XF 1.4 Use Username Markup on Alternate Text


Active member
I am stuck and I wondered if someone might be able to help.

What I am trying to do is use a custom profile field in place of the username in message_user_info, with the same markup as the username (meaning that it looks the same, and when you click on it it brings up the member card). I can't seem to figure out how to copy the formatting of the real username.

Here is what I have so far (I want it to show the actual username if there is no text entered in the custom profile field):

<xen:if hascontent="true"><xen:contentcheck>{xen:helper userFieldValue, $userFieldsInfo.six_character_name, $user, {$user.customFields.six_character_name}}</xen:contentcheck><xen:else /><xen:username user="$user" itemprop="name" rich="true" /></xen:if>
Any ideas? I can add the styling as a font class but can't seem to get the link bit. Thanks!