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"/>

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?

2 Answers 2


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


In Community Builder -> Theme Check the option Use a custom search component and select your customizable search lightning component. Component must implement forceCommunity:searchInterface

<aura:component implements="forceCommunity:searchInterface" access="global">
<div class="search">
    <div class="search-wrapper">
        <form class="search-form">
            <div class="search-input-wrapper">
                <input class="search-input" type="text" placeholder="My Search"/>
            <input type="hidden" name="language" value="en" />


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .