This is how you can find out the page type (category, section or article), and the corresponding (category, section or article) id:
/**
* Finds current page type (categories, sections or articles)
* and corresponding id
*
* @return {Object} Returns object with 'type' and 'id' properties
*/
function getPageInfo () {
var _t = window.location.href.split('/hc/');
_t = _t[1].split('-')[1].split('/');
return {type:_t[1], id:_t[2]}
}
//USAGE:
//var page = getPageInfo();
//var pageType = page.type;
//var pageId = page.id;
//console.log(page.type);
//console.log(page.id)
Cheers,
Diziana (Free and Premium Zendesk Themes and Plugins)