Adding code to the backend



  • Brett Bowser
    Zendesk Community Team

    Hey Jacque,

    It may not be necessary to use custom code to hide a specific section in your Help Center. Have you looked into using user segments to restrict access to content in your Help Center?

    If you restrict all articles within a section to a specific user segment, then that section will be hidden to only those users as well.

    Let me know if that doesn't accomplish what you're looking for!

  • Simon Blouner
    Community Moderator

    Hey Jacque Gothard

    In case you're not interested in the solution suggested by Brett (Using the  User Segments, which is probably the best and easiest way of achieving what you want), you can do the following customization on the theme;

    Depending on your theme and customizations already done, you would probably edit your category_page.hbs template file.

    Inside your sections each loop, you could do a

    {{#if id '123456'}} <-- add your specific section id.

    //Leave HTML empty.

    {{ else }}

    // do regular section and articles HTML


    Be aware, that this would actually still allow the end-users to visit the URL if they, for instance, are being sent a link for the specific section.

    So the proper way is absolutely to utilize the User Segmentation mentioned by Brett!

    #helpsome regards,
    Simon Blouner
    Zendesk Consultant @

  • Jacque Gothard

    Thanks, Brett and Simon! I'll consult with the team and see what might work best for us :)


Please sign in to leave a comment.

Powered by Zendesk