The CreatorCon Call for Content is officially open! Get started here.

Limiting kb-search widget to just a single knowledge base

davilu
Mega Sage

Our team has a portal with multiple knowledge bases.  We have cloned the ootb kb-search widget and want to limit the search to just a single knowledge base.  Is this possible?  We see that ng-click triggers a function called c.keywordChanges and was hoping to add some code to filter the results down to a single knowledge base, but can't seem to find where the code behind that function is.  Has anyone done this before?  Thanks!

2 REPLIES 2

Moedeb
Tera Guru

If I understand correctly you are using the search widget in the Service Portal and want anyone doing a search to only get results for one specific knowledge base?

If that is correct then you should not need to change the code in the widget at all, you do it in the particular portal configuration.

In the menu, go to "Service Portal" >> Select "Portals", then select the portal that you are using from the list eg: "Service Portal", then once the config page is loaded scroll to the bottom and you should have 2 tabs there called: "Search Sources" and "Knowledge Base"

You just need to make sure that only the sources and specific knowledge base is listed there, then when someone uses the search widget on the portal, they are the only places results will show from.

Hope this is what you are looking for.

Do you know how we would limit the portal knowledge bases widget to only show active knowledge bases in the pick list?