Adding code to the backend

Answered

3 Comments

  • Brett - Community Manager
    Comment actions Permalink

    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!

    0
  • Simon Blouner
    Comment actions Permalink

    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

    {{/if}}

    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 @ helphouse.io

    0
  • Jacque Gothard
    Comment actions Permalink

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

    0

Please sign in to leave a comment.

Powered by Zendesk