XF 2.3 Adding New threads to What's new

frm

Well-known member
I wanted "New threads" in "What's new", so I created a Page node to contain the widget.

I put this in the Page node:
HTML:
<xf:set var="$pageSelected">new_threads</xf:set>

<xf:wrap template="whats_new_wrapper">
    <xf:set var="$pageSelected" value="overview" />
</xf:wrap>

<xf:widget key="whatsNewNewThreads" />

But, I can't get it to select the New threads tab in whats_new_wrapper like all other options.

1726368099242.webp

I edited the template whats_new_wrapper and entered this, like all other items appearing in the wrapper:
HTML:
    <!--[XF:links:after_featured]-->
        <a class="{$baseClass} {{ $pageSelected == 'new_threads' ? {$selectedClass} : '' }}" href="{{ link('whats-new/threads') }}" rel="nofollow">New threads</a>
        <!--[XF:links:after_new_threads]-->

I'm thinking it's that there's an error with <xf:set var="$pageSelected">new_threads</xf:set> in the Page node to not select the tab or this isn't possible to do, as seen with selecting New posts:

1726368066207.webp

Any help?

Also, the Page node has a route filter of pages/new-threads to whats-new/threads.

Thanks
 
I've tried adding this (and variations of it) to PAGE_CONTAINER and whats_new above the wrap to set the variable before it's called in the macro, but still a no go.

HTML:
    <xf:if is="$xf.uri == '/whats-new/threads'">
        <xf:set var="$pageSelected" value="new_threads" />
    </xf:if>
 
These are two completely different methods, but I like how mine works as it has a more native "What's new" feel as to how it should work if they included New threads as they did New posts.

Displaying it on What's new: Overview just shows it on the "What's new" page, which features a "New posts" page in a tabbed navigation bar too.

If you click "New posts", you get all the New posts paginated. Where's the "New threads" page like that? There is none. You're forced to use a widget, as you pointed out, or hack up a page node to appear like it has the same functionality with a widget, create route filters, insert it into the public navigation, and with the template edit.

If you still don't understand what I was trying to accomplish,

New posts (active What's new feature):
1726450651898.webp

New threads (A page node):
1726450677615.webp
 
Back
Top Bottom