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

Separate sticky threads from normal ones

ALMUSA

Active member
#1
ALMUSA submitted a new resource:

Separate sticky threads from normal ones - Separate sticky threads from normal ones

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
Code:
<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.
Code:
<xf:if...
Read more about this resource...
 
Last edited:

Allan

Well-known member
#6
Thank you :)

PS: I sugget this code:
Code:
.stickySeparator {
  height: 12px;
  background-color: @xf-paletteColor1;
  border-style:solid;
  border-color: #e7e7e7;
  border-bottom: none;
  border-left: none;
  border-right: none;
  margin: 0px;
}
 
#7
1518724883207.png

When I tried copying it exactly as the guide said, it's showing multiple borders. As you can see it's showing 3 sticky threads separate, then last one is linked with normal threads.

I am using the Tactical theme, but I would think it'd work?
 

ALMUSA

Active member
#12
It's in my signature.

Want me to put the modifications back on, or leave em off for now?
Find this:

Code:
<xf:if is="$stickyThreads is not empty OR $threads is not empty">
                    <xf:if is="$stickyThreads is not empty">
                        <div class="structItemContainer-group structItemContainer-group--sticky">
                            <xf:foreach loop="$stickyThreads" value="$thread">
                                <xf:macro template="thread_list_macros" name="item" arg-thread="{$thread}" arg-forum="{$forum}" />
                            </xf:foreach>
                        </div>
Then place this code right below

Code:
<xf:if is="{$stickyThreads}">
            <hr class="stickySeparator"/>
        </xf:if>
Go to extra.less and place this

Code:
.stickySeparator {
  height: 12px;
  background-color: #ececec;
  border-style:solid;
  margin: 0px;
}

Its just that the code occurs twice in the template and you must have placed it under the second one. I should have made that clear from the beginning. My mistake.
 
#13
Find this:

Code:
<xf:if is="$stickyThreads is not empty OR $threads is not empty">
                    <xf:if is="$stickyThreads is not empty">
                        <div class="structItemContainer-group structItemContainer-group--sticky">
                            <xf:foreach loop="$stickyThreads" value="$thread">
                                <xf:macro template="thread_list_macros" name="item" arg-thread="{$thread}" arg-forum="{$forum}" />
                            </xf:foreach>
                        </div>
Then place this code right below

Code:
<xf:if is="{$stickyThreads}">
            <hr class="stickySeparator"/>
        </xf:if>
Go to extra.less and place this

Code:
.stickySeparator {
  height: 12px;
  background-color: #ececec;
  border-style:solid;
  margin: 0px;
}

Its just that the code occurs twice in the template and you must have placed it under the second one. I should have made that clear from the beginning. My mistake.
I'll give it a try. For some reason, now 'forum_view' shows nothing when I search for it. Hmm.