Use content-check to wrap the non-sticky thread list container in the forum_view template.

ShikiSuen

Well-known member
This is to cope with the situation that some sitemasters might want a border line between sticky threads and unsticky threads.
This can simply be done by LESS:
Less:
        .structItemContainer-group {
            &.structItemContainer-group--sticky:not(:last-child) {
                border-bottom: @xf-borderSizeMinorFeature solid @xf-borderColorCalm;
            }
        }

However, it has an issue that the border still exists even if a forum has only sticky threads left, leading to the necessities of adding a contentcheck to the non-sticky thread list container. By dong so: if there's only sticky thread left, then the sticky thread list container becomes the last-child.

// I have a concern that whether this will introduce a potential bug to XF, unless XF 2.2.x forum_view doesn't auto-update the thread list contents when new threads are posted by others.

The change to the forum_view template looks like this:
1625726795727.png
 
Upvote 1
Top