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

XF 1.3 Message Template Conditional based on Prefix

You can use $thread.prefix_id in xen:if to apply new classes, HTML, etc.
I tried this without any result
<li id="{$messageId}" class="{xen:if '{$thread.prefix_id} == 2', 'prefixStyle'} message {xen:if $message.isDeleted, 'deleted'} {xen:if '{$message.is_staff}', 'staff'} {xen:if $message.isIgnored, ignored}" data-author="{$message.username}">
What might be wrong ?
I assumed you meant the thread_view template.

I doubt that is available in the message template.
How should I list all the variable availables in a template.

I found JakeBunce's resource, but I think it only lists the content of a variable (i.e. $thread contents are: thread_id, node_id, etc)
but not the variable itself (i.e. thread_view contents are: $thread, $forum, etc)

I'm searching the latter.

Is $thread.prefix_id can be used inside PAGE_CONTAINER template ?

If it can't , can I style .forum_view .titleBar based on the prefix without developing any custom add-on ?

thx :)


XenForo moderator
Staff member
I'm not sure what it is you're trying to do.

The forum view title bar is a forum level element, not thread level, so a thread prefix wouldn't apply there.