Issue
Description
Customization to have the "KB Category Page" widget filtering articles based on the user's session language
Procedure
1 - create a clone of "KB Category Page"
2 - after line 13 of the server script (data.items = $sp.getKBCategoryArticleSummaries...) add the following lines of code:
var articles = [];
for(var i in data.items){
var articleId = data.items[i].sys_id ;
var grKb = new GlideRecord('kb_knowledge');
grKb.addQuery('sys_id',articleId );
grKb.addQuery('language',gs.getSession().getLanguage());
grKb.query();
if(grKb.hasNext()){
articles.push(data.items[i]);
}
}
data.items = articles ;
3 - replace the "KB Category Page" by the clone in the kb_view2 page
Applicable Versions
from Istambul onwards