Skip to content

Add Indexed Search to Navbar

Benjamin Kott edited this page May 26, 2020 · 1 revision
  1. Configure targetPid of Indexed Search TypoScript Constants

    plugin.tx_indexedsearch.settings.targetPid = 123
    
  2. Assign targetPid of Indexed Search to the main Fluid Template in your TypoScript Setup

    page.10.settings.pageIds.search = {$plugin.tx_indexedsearch.settings.targetPid}
    
  3. Overwrite Drop-In-Partial Navigation/MainAfter or Navigation/MainBefore in Page/DropIn within your Sitepackage

     <ul class="navbar-nav">
         <li class="nav-item">
             <f:form
                 extensionName="IndexedSearch"
                 pluginName="Pi2"
                 controller="Search"
                 action="search" method="post"
                 pageUid="{settings.pageIds.search}"
             >
                 <div class="input-group">
                     <f:form.textfield
                         name="search[sword]"
                         class="form-control"
                     />
                     <div class="input-group-append">
                     <button class="btn btn-primary" type="submit">Search</button>
                     </div>
                 </div>
             </f:form>
         </li>
     </ul>