Add Country filter option on Topic Content Widget.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-01-2024 02:59 AM
Requirement:
To have a country filter on the topic content so that user can filter-out the items based on country selection. Currently required for only requests.
So, created a country field type "glide-list" on the "sc_cat_item" table referenced to "core_country" and added the country. Cloned the "topic_content" widget. So, after going through the widget, I can see "Ais Search" div are visible as instance has "Ai Search" enable. Is there a to add the country filter on the widget next to "sort by" or "filter" by which filter out the cat Items based on the country selected.
 
Thanks in advance!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-01-2024 05:38 AM
Hey @Neeraj_27 this will require customization. So I would recommend making a clone of the OOTB widget ( topic_content) and leave the original intact.
If you look in the Server Script you can see how the Filtering is defined
function getFilterName(table) {
var content_table_filter_map = {
'sc_cat_item' : REQUESTS,
'kb_knowledge' : ARTICLES,
'sn_lc_course_item' : COURSES
};
return content_table_filter_map[table];
Your going to have to add new code (and corresponding code elsewhere) if you want to add filters returning this level of detail. Currently our filters OOTB simply break out between Requests and Articles.
It might be worth discussing what value this filtering option will bring, versus the technical debt you will take on having this custom widget (which you will need to ensure is on every topic, this is where you can use custom topics) and acknowledging your platform upgrades will skip over this core widget, as it is seen as customised.
Typically managing and/or restricting availability to users in X country is done through User Criteria on the Catalog Item or Knowledge Article itself. So might be worth reviewing why you need to implement customisation instead of using a longstanding OOTB feature
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-22-2024 10:27 AM
PRB1802270 ('Topic Content widget displays German knowledge articles when the session language is English') had feedback from Dev that it is an expected behavior that the Topic Content Widget will display both the articles in the System language as well as Session language.
In Xanadu we now have 'enable_topic_content_lang_fallback' System Property that when set to false will mean only content in the session language will be displayed in the 'Topic Content' widget.