35 views

How to exclude certain article categories from searches performed in the Knowledge homepage and in contextual search

Description


This article explains how admins can exclude certain knowledge categories or knowledge base from contextual search or knowledge homepage

Note: Please note this will not exclude articles from global search  

Solution


On OOB business rule: knowledge query 
Insert code at the very top of the script found on the Advanced tab as follows: 
 
var action = gs.action.getGlideURI().toString(); 
if(action.search("angular.do") > -1 || action.search("cxs_macro_name") > -1) { 
current.addQuery('kb_category','!=','<sys_id of the category you want to exclude>') ; 

Applicable Versions


ALL

Article Information

Last Updated:2018-04-10 12:19:58
Published:2018-03-21