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

XF 2.0 New Posts widget on page issue

Mr Lucky

Well-known member
#1
I have create a new Posts widget (key= new_posts_home_page) and call it up on a page node (my home page) using this:

Code:
<xf:widget key="new_posts_home_page" />
That all seems fine so far

It is set to show 10 entries. However when you click the show more button instead of staying on the home page, it goes to the New Posts page under the What's New tab.

This seems a bit odd, I'd expect to stay on the home page and just expand to show more posts.

What have I done wrong
 

Chris D

XenForo developer
Staff member
#2
That’s pretty much just how it’s designed. Widgets don’t support things like pagination and dynamic contents based on user input.

That doesn’t mean to say they won’t ever (or can’t with custom code), but that’s just not how they work right now.
 

Mr Lucky

Well-known member
#3
That’s pretty much just how it’s designed. Widgets don’t support things like pagination and dynamic contents based on user input.
.
Okeydokey, fair enough. In xf1 I was doing the same thing with widget framework addon and the recent posts widget addon and that would just expand the widget. Seems to make more sense that way but thanks for clarifying, a least I know I'm not doing anything wrong.

That doesn’t mean to say they won’t ever (or can’t with custom code), but that’s just not how they work right now.
Well, when you get a spare moment... :)
 

Mr Lucky

Well-known member
#4
The odd thing is it opens in the New posts page, but it follows the filter set in the widget, not the user's default preference, so people find that a bit off putting.