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

Appending something to username via template?

Andy Huang

Well-known member
<xen:username> tag gives a nicely formatted link, which is great.
What if I want to append something to username via template?

For example:
<xen:username user="$user" itemprop="name" rich="true" />
<a href="members/someone.1/" class="username" itemprop="name"><span class="style3">Someone</span></a>
What if I want it to generate:
<a href="members/someone.1/" class="username" itemprop="name"><span class="style3">Someone</span> <span class="userTitle">(blah blah blah)</span></a>

Jake Bunce

XenForo moderator
Staff member

In looking at the code I don't see any option for that.

You can use a separate call for the title:

<span class="userTitle">{xen:helper usertitle, $user}</span>
If you want it hyperlinked then it's this:

<a href="{xen:link members, $user}"><span class="userTitle">{xen:helper usertitle, $user}</span></a>

Andy Huang

Well-known member
Ah, I'm not appending user title... I'm interested in appending something using userTitle class text.
So I guess I'd need to rebuild the link manually via template, then. Okay, thanks :)