• 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

#3
You can use $thread.prefix_id in xen:if to apply new classes, HTML, etc.
I tried this without any result
Code:
<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 ?
 
#5
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.
 
#8
@Brogan

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 :)
 

Brogan

XenForo moderator
Staff member
#9
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.