xenforo 2 Separate sticky threads from normal ones

guclusat

Tanınmış Üye
Süper Moderatör
As I was trying to separate normal threads from sticky ones I finally managed to do it and it was very simple. There is no need for template modification whatsoever.

1- Go to template forum_view
2- find this code
Kod:
<xf:macro template="thread_list_macros" name="item" arg-thread="{$thread}" arg-forum="{$forum}" />
                           </xf:foreach>
                       </div>
3- Place this code below the above code and hit save.
Kod:
<xf:if is="{$stickyThreads}">
            <hr class="stickySeparator"/>
        </xf:if>
4- Now go to template extra.less and add this
Kod:
.stickySeparator {
  height: 12px;
  background-color: #ececec;
  border-style:solid;
  margin: 0px;
}

Hit save and you are good to go.

You can play with the css code in case you want to change the color or the hight of the bar as I did below in the screenshot.

1.png
 
Geri
Yukarı