New Threads widget title link does not respect 'Forum limit' selections

Stuart Wright

Well-known member
I have a widget on the forum list for showing the latest classified adverts.
It uses the New threads widget definition.
The title is Latest Classified Adverts.
I use the Forum Limit selection to select threads only from our classified advert forums and this works fine.
However, the widget title link is
Code:
https://www.avforums.com/whats-new/
which, of course, does not respect the selected forums and is therefore confusing to members who click it expecting to see only classified ads.
Is this a bug?

1.jpg
 
Last edited:
Upvote 1

nicodak

Well-known member
No, it's unfortunately designed like this.
But you can edit the widget_new_threads template to get the right link for the right widget.
 

Stuart Wright

Well-known member
No, it's unfortunately designed like this.
But you can edit the widget_new_threads template to get the right link for the right widget.
The design is broken, then.
Because if widget_new_threads is customised for one particular filtered list, then it will be broken for others.
Probably better to remove the link altogether until it's fixed.
 

nicodak

Well-known member
@Stuart Wright not necessarily.
Replace
Less:
<h3 class="block-minorHeader">
    <a href="{$link}" rel="nofollow">{$title}</a>
</h3>
by
Less:
<h3 class="block-minorHeader">
    <xf:if is="$title == 'YourWidgeTtitle'">
        <a href="your URL" rel="nofollow">{$title}</a>
    <xf:elseif is="$title == 'AnotherWidgetTitle'" />
        <a href="another URL" rel="nofollow">{$title}</a>
    <xf:else/>
        <a href="{$link}" rel="nofollow">{$title}</a>
    </xf:if>
</h3>
 

ge66

Well-known member
The design is broken, then.
Because if widget_new_threads is customised for one particular filtered list, then it will be broken for others.
Probably better to remove the link altogether until it's fixed.
I think the best solution to this would be xenforo have a field in widgets to set where the title should link.

Or maybe even better paste the html with links and title.

I have a couple new threads widgets that has a couple of forums each. The names of the forums are in the title, and each link to respective forum.

For now have solved it similar to what @nicodak shows above.

I think it makes it easier for users to find new and interesting content.
The widgets need more love.
 

Chris D

XenForo developer
Staff member
Going to consider this as a suggestion for now. There are some reasonable ideas here but ultimately it's additional (new) functionality to define the desired location.

Because the widgets support pulling threads from multiple nodes, it's difficult to infer from that automatically what the desired URL should be.
 

ge66

Well-known member
Going to consider this as a suggestion for now. There are some reasonable ideas here but ultimately it's additional (new) functionality to define the desired location.

Because the widgets support pulling threads from multiple nodes, it's difficult to infer from that automatically what the desired URL should be.
How about my html suggestion above, automatically could be bad.
If you have like I have a couple of forums that have newest threads in a widget you might like to have a couple links in the title.
I have a title:
Dogs, Cats & Other
It would be nice to be able to link every word to respective forum.
A html or bbcode title might solve most wishes?
 
Top