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

Thread List From A Specific Node In Pages?

Discussion in 'XenForo Development Discussions' started by Divvens, Jul 3, 2015.

  1. Divvens

    Divvens Well-Known Member

    I want to create a sort of directory for all threads in a particular node.

    Maintaining a directory manually is becoming painful, is there anyway I can pull a list of all threads in X Node and display it in alphabetical order (A-Z) on a page node?
  2. Brogan

    Brogan XenForo Moderator Staff Member

    It would require a PHP callback at the very least.
  3. Divvens

    Divvens Well-Known Member

    Could I be guided as to the process and what the PHP should include? Have never done something as such before.

    But I want to learn since it'll sort out a lot of our manual updation.
  4. Divvens

    Divvens Well-Known Member

    I found this resource: How to show a forum in a page

    I want to know a couple of things:
    1. Can I set the default thread organization to alphabetical and what would be the required code
    2. Would it be intensive if many threads are shown on the list (say around 150-200)
    3. If yes, is there anyway to paginate them.
    4. If no, is there any other way to achieve what I want?
  5. Brogan

    Brogan XenForo Moderator Staff Member

    Essentially you need to grab all of the threads from the node using a query, remove any due to permissions and authors being ignored, etc.
    Then pass the resulting thread list array to the template and loop through it applying the HTML and CSS to display them.

    You set the order in the query, so yes you could order it on title.

    200 threads on one page shouldn't be an option but you could paginate it.
    That would require additional code and queries.

    You would likely need to create a small add-on to achieve that.

Share This Page