Fixed Thread list item missing 'prefix' class

Affected version
2.0

Case

Well-known member
#1
In xF1 the markup for a thread with a prefix in a forum was...

<li id="thread-1" class="discussionListItem visible prefix1" data-author="Admin">

In xF2 this has changed to...

<div class="structItem structItem--thread js-inlineModContainer js-threadListItem-1" data-author="Admin">

The prefix1 class is missing. Is it possible to get this back?
 

Chris D

XenForo developer
Staff member
#2
Yes, we've added it back. From beta 2 you will now see a thread that is prefixed with prefix ID 1 will look like:
HTML:
<div class="structItem structItem--thread is-prefix1 js-inlineModContainer js-threadListItem-1" data-author="Admin">
Though please note that many different add-ons can use prefixes, and each add-on will have their own prefix IDs. If you're using the is-prefix1 class for styling purposes then you will need to be somewhat specific about which content type it is for, e.g.
Less:
.structItem--thread.is-prefix1
{
    background-color: yellow;
}
Will ensure that styling only applies to threads that use a prefix ID of 1.
 
Top