Separate sticky threads from normal ones [Deleted]

KSA

Well-known member
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:
many thanks

To avoid confusion, it might be worth pointing out the code to find occurs twice in the template.
 
  • Like
Reactions: gxd
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;
}
 
1518724883207.webp

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?
 
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.
 
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.
 
Trying to do this on the default theme and a paid them: BOTH forum_view templates (the default and the paid) give me this error when I try to save:

I keep getting this error and it's not just on the flatawesome child, but even on the default theme:
Oops! We ran into some problems.
Oops! We ran into some problems. Please try again later. More error details may be in the browser console.

And yet NOTHING is there in the browser console.
 
This is a very simple template mod that should not trigger any errors. Try to use browser inspection tool to find out if there is any console error. It sounds like permission related issue to me.
 
Back
Top Bottom