Accessing {{category_tree_with_article}} or {{categories}} in header



  • Justin Palmer
    Comment actions Permalink

    I know this is an old post, but I'm running into the same problem. Any input, anyone? 

  • Patrick Murray
    Comment actions Permalink

    Is there a ZenDesk response to this? Adding the ability to put categories in the header would really open up many more navigation options.

  • Rebecca
    Comment actions Permalink

    Hi all -

    At this time this is not possible. With curlybars, our Help Center templating language certain helpers and objects can only render on certain help center template pages. The best means to see what renders on which page is going to our Help Center templating Developer docs, select the template page in question, and seeing what is listed as available helpers, properties, or objects in the specific template you're working in. Unfortunately, category tree is not an option on the header template at this time.

    However you could likely accomplish a category navigating via custom code in the header itself; I looked around and was not able to find any existing resources on this specific customization, however the options would be coding a navigation menu with href links or possibly using our Help Center API to ensure it's dynamic. 

  • Scott Allison
    Comment actions Permalink

    Here's some JavaScript that I placed in my script.js file. I added an empty <ul id="support_categories"></ul> element into header.hbs where I wanted my categories menu to be located. Just replace "" with the domain name of your Zendesk help center.

    var menu = '';
    $.get('' + window.I18n.locale + '/categories.json', function(data) {
        if (data.categories.length) {
            $.each(data.categories, function(id, category) {
                 menu = menu + '<li><a href="' + category.html_url + '">' + + '</a></li>';


Please sign in to leave a comment.

Powered by Zendesk