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

XF 1.2 Can I add 'Recent Posts' to index route?

Discussion in 'XenForo Questions and Support' started by brucey, Dec 2, 2015.

  1. brucey

    brucey Member

    I can add '/find-new/7687437/posts' to my index route to show all new unread posts on the homepage.

    But I want to show all recent posts, read or unread.

    I guess I can't add '/find-new/posts?recent=1' as it's technically a search query?

    Anyway I can work around this to show all recent posts?

    (please don't suggest the Widget Framework New Threads add-on as it doesn't work very well)
     
  2. wang

    wang Well-Known Member

    I do not think that you can accomplish this with adding the link only. Most likely that will need custom developement.
     
  3. brucey

    brucey Member

    I agree.

    I don't get how it works though.

    I can use the Widget Framework to add a template, but this doesn't have it's own template which would run the query does it?
     
  4. wang

    wang Well-Known Member

    I do not know if it does it or not, because I am not using that add on.
     
  5. brucey

    brucey Member

    I mean in XF. New Posts is 'find_new_posts' but recent posts just seems to be a search that's displayed in that template hmm
     
  6. Optic

    Optic Well-Known Member

  7. brucey

    brucey Member

    Yeh but that doesn't display 'read' threads. Users get confused when the ones they've read dissappear
     
  8. James

    James Well-Known Member

    That's how the URL is designed to work so without custom development you're going to have to either:
    • Use find-new/posts and deal with 'read' threads disappearing
    • Use find-new/posts?recent=1 and display recent posts (read or unread)
    • Use recent-activity/ and display the forum's recent activity (shows everything not just posts)
     
    drastic likes this.
  9. brucey

    brucey Member

    I've worked out how to do it.

    If you go to 'New Posts' and then click 'Recent Posts', the URL is generates can be used to display Read and Unread posts, which can be used as Index Route :)

    eg. https://xenforo.com/community/find-new/7691782/posts

    Any potential issues using this?

    EDIT: actually that doesn't show any posts made after that search :/
     
  10. Beanjam

    Beanjam Active Member

    I'm currently trying to do the same thing, did you find a solution?
     
  11. AndyB

    AndyB Well-Known Member

Share This Page