[SalesForce] Napili community lightning component custom header with search bar

I developed a lightning component using Bootstrap for a custom header for my self-service community. I have been able to include Global Search via

<form action="/<community name>/search/SmartSearch" method="get">
  <input id="phSearchInput" type="text" name="str"/>
  <input type="submit" value="Search"/>
</form>

but this renders the standard Global Search results page instead of the Napili community template search results page. I haven't been able to figure out how to replicate the search functionality included with the Napili template. Does anyone know how to reference the Knowledge search bar used for communities instead of Global Search?

Best Answer

The solution I found was removing the search result component on the search page and adding the global search component. You could then select within the global search component which objects it would return results from

Related Topic