Recent searches
No recent searches

Scott Allison
Joined May 28, 2021
·
Last activity Oct 27, 2021
Following
0
Followers
0
Total activity
2
Votes
0
Subscription
1
ACTIVITY OVERVIEW
BADGES
ARTICLES
POSTS
COMMUNITY COMMENTS
ARTICLE COMMENTS
ACTIVITY OVERVIEW
Latest activity by Scott Allison
Scott Allison commented,
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 "mysupportwebsite.com" with the domain name of your Zendesk help center.
var menu = '';
$.get('https://mysupportwebsite.com/api/v2/help_center/' + 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 + '">' + category.name + '</a></li>';
});
$('#support_categories').html(menu);
}
});
View comment · Posted Sep 21, 2018 · Scott Allison
0
Followers
0
Votes
0
Comments