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

XF 1.4 Hide node on forum home to guest but allow content to be viewed

Discussion in 'XenForo Questions and Support' started by Live Free, May 18, 2016.

  1. Live Free

    Live Free Active Member

    Is there a way to do this? I assume I need to use conditional statements, but how?

    I have a forum with posts I want to remain available for search engine purposes but I want to hide the node on the forum list page, but not the node's content - but for guests. When I change the Unregistered uaergroups permissions and revoke view node but allow them to view threads it still hides threads.

    What's the best way to do this?
     
  2. Mr Lucky

    Mr Lucky Well-Known Member

    I may be wrong about this, but as the node is a list of links to the threads, are you sure that without it, Google will still be able to find and crawl through to the actual threads?

    Edit: presumably though, the sitemap will provide the links?

    Also if a guest can't see the node, but finds a thread via Search engine they will get an error if they then follow the breadcrumbs back up a level
     
    Last edited: May 19, 2016
  3. Brogan

    Brogan XenForo Moderator Staff Member

    One way of doing it would be to uncheck 'Display in the node list' for that forum.

    Then create a link forum which guests do not have permission to view.
     
  4. Live Free

    Live Free Active Member

    I'm mostly trying to prevent existing indexed threads from becoming de-indexed. Why would they get an error? I essentially what the node to exist but just not have it display on the index page, but for guests and new members only.


    I think this would work. Any downside with using the link forum? Could this also be accomplished by hiding the node id on forum_list with css?
     
  5. Brogan

    Brogan XenForo Moderator Staff Member

    No issues with using link forums.

    You can try using CSS with the node ID and the LoggedIn/LoggedOut class.
     
  6. Mr Lucky

    Mr Lucky Well-Known Member

    Maybe I am misunderstanding, bu if the guest can view a thread, but not the node that thread is in, then when they click on the link to the node which is above the thread, they would be clicking to a node that they don't have permission to view, hence the error message. It probably won't make much difference, but (among other things) for SEO purposes it is technically not good to have breadcrumbs that don't work.
     
  7. Live Free

    Live Free Active Member

    Added this to EXTRA.css and it seemed to work:

    Code:
    
    .LoggedOut .nodeList .node_125 {
        display: none !important;
        visibility: hidden !important;
    }
    
    Logged out I can't see it on forum list but can access the forum url and threads. Logged in as a New Member user group and can't see it (per forum permission settings) as intended and all other Member groups can see it.

    @Mr Lucky What I'm trying to do is not prohibit them from accessing the forum or threads, but just not show the forum on the forum homepage. I think my CSS works and Brogan's solution would have worked as well (didn't want to deal with changing the link forum icon :p )
     

Share This Page