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

XF 1.2 Hide thread list on forum_view template when There are no threads to display.

Discussion in 'XenForo Questions and Support' started by maxicep, Mar 2, 2014.

  1. maxicep

    maxicep Active Member

    Yes, as i said on title of thread, i want to hide thread list block on forum_view template if there are no threads to display.

    Because i have subforums on some forum categories and i dont give to allow create thread on these categories. I want show just subforums and hide the thread list template because it says "There are no threads to display message" only.
     
  2. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    Better to create category nodes instead of using empty forum nodes for that purpose. Category view pages have no thread list. They are strictly for organizational purposes.
     
  3. maxicep

    maxicep Active Member

    Yes i have categories too, also forums too and subforums.
    I cant re-organize them because viewing is good for now.

    I need just condition code for hide "There are no threads to display message" on forum_view
     
  4. Amaury

    Amaury Well-Known Member

  5. maxicep

    maxicep Active Member

  6. Jeremy

    Jeremy XenForo Moderator Staff Member

    You need to make sure the ID matches.
     
  7. maxicep

    maxicep Active Member

    Yes i did it of course but as i said it didnt hide.

    .node55 .discussionList.section.sectionMain,
    .node50 .discussionList.section.sectionMain
    {
    display: none;
    }

    Is it right ?
     
  8. Amaury

    Amaury Well-Known Member

    You need to use your forum IDs.
     
  9. maxicep

    maxicep Active Member

    I did it already as i said :) i know and i changed the node ids but didnt hidden
     
  10. Brogan

    Brogan XenForo Moderator Staff Member

    This also works, I have just tested it:
    Code:
    .node10 .forum_view .discussionList.section.sectionMain
    {
    display: none;
    }
    If it's not working for you then you're using the wrong node ID.
     
  11. maxicep

    maxicep Active Member

    I write to node_forum.css, node_list.css also extra.css too that;

    .node335 .forum_view .discussionList.section.sectionMain
    {
    display: none;
    }


    Node id : 335


    Check it also check css, it should be right but not hidden.
     
  12. Brogan

    Brogan XenForo Moderator Staff Member

    Your style is using non standard classes and elements.
    For example: .listborderpath

    You will need to adapt the CSS given to suit your style.
     
  13. maxicep

    maxicep Active Member

    Thank you so what should be the right css code for me ?
     
  14. Brogan

    Brogan XenForo Moderator Staff Member

    Try .node335 .forum_view .discussionList.listborderpath
     
  15. maxicep

    maxicep Active Member

    Thanks @Brogan it worked ..

    But i think, should be easy way to hide empty forum_lists with a condition. Better than css
     
  16. Brogan

    Brogan XenForo Moderator Staff Member

    There is.
    It's called a category.
     
  17. maxicep

    maxicep Active Member

    Then, how can i convert a forum to category without lose any data and viewing order
     
  18. Amaury

    Amaury Well-Known Member

    Move its contents to another forum and then delete it and create a category.
     
    maxicep likes this.
  19. maxicep

    maxicep Active Member

    Thanks :)
     

Share This Page