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

View All in pagination with rel="canonical" tag

Discussion in 'XenForo Development Discussions' started by Jon Peters, Jun 12, 2015.

  1. Jon Peters

    Jon Peters Member

    By default Xenforo implements rel="next" and rel="prev" tags.

    What I'd like to do is add a "View All" to the pagination and then add rel="canonical" tags to the view all page.

    The two variations are illustrated at: https://www.seroundtable.com/google-pagination-solution-14037.html

    Has anyone implemented the View All pagination or point me in the right direction? I'm a programmer but have limited experience with Xenforo. Thanks!
     
  2. Liam W

    Liam W Well-Known Member

    You would have to make an add-on, and while it wouldn't be too difficult, it would be annoying.

    Also, it would put strain on the database and php server, getting all the data in one go.

    Liam
     
  3. Jon Peters

    Jon Peters Member

    Probably what I would do is implement it only for threads that were under a certain threshold of messages. If the forum is coded well it shouldn't take much more to pull say 80 messages instead of 20.
     
    Liam W likes this.
  4. Liam W

    Liam W Well-Known Member

    You should look in the thread controller then, as well as the threads route which sets the page id parameter.

    I guess the easiest way to do it would be to have the navlink add an &all to the URL, which is checked for in the extended controller.

    You then extend the model etc. to change the returned thread count (which isn't difficult).

    The issue would be editing the pagenav template to add the new link to all ;)

    Liam
     
  5. Jon Peters

    Jon Peters Member

    Thanks for the direction. Sounds like you could probably do it a lot quicker than I could. Please PM me if you would you be interested in coding this up for a fee. :)
     

Share This Page