"Popular topics" not working in my portal
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-31-2025 11:32 PM
Hi, can someone help me on the below query.
I have been trying to create new service portal, i tried to replicate the employee center in which i used OOB widget called "popular topics", it was getting taxonomy data for EC portal and it works fine, but not with my newly created service portal, is there any changes required in script or something?
var taxonomy = $sp.getTaxonomies();
if (!taxonomy || taxonomy.length === 0) {
return;
}
var session = gs.getSession();
var popularTopicsDataKey = 'sn_ex_sp_popular_topics_data' + session.getLanguage() + gs.getUserID();
var popularTopicsData = JSON.parse(session.getClientData(popularTopicsDataKey));
if (popularTopicsData === null || popularTopicsData.length != limit) {
data.popularTopics = new PopularTopicsUtil().getPopularTopics(taxonomy, limit, false);
session.putClientData(popularTopicsDataKey, JSON.stringify(data.popularTopics));
} else {
data.popularTopics = popularTopicsData;
}
Thanks in advance