Forum Discussion

Quelyn's avatar
Quelyn
Genius
10 years ago

Getting "Search Form" to show on all pages.

Hello!  I have the current layout for my header in Lithium.  
Screen Shot 2015-02-04 at 1.49.11 AM.png

This is the universal "Header" page that should be on all pages.  However, the "Search Form" element only shows on some pages. For example, it doesn't show on the TKB page.  

 

Is there a particular reason for this?  Has anyone else figured out how to get this to show up regardless of what page you are on? 

 

Thanks!

  • Hi Quelyn, 

     

    The answer to this is in the XML for the TKB page layouts, if you inspect this you'll notice a section of XML before the closing quilt tag similar to below:

     

    <remove from="breadcrumb" for="Header">
    <component id="search-wrapper"/>
    </remove>

     

    This carries across all TKB pages as far as I'm aware and is an out of the box configuration.

     

    You can remove the <component id="search-wrapper"/> line to bring the search field back however you'll notice that it will not default the dropdown to TKB or TKB related content areas instead scoping the granularity of search to the Community.

     

    You should however be able to get around this limitation using JavaScript to change the and default it to Knowledge Base etc on page load.

     

    An example of this can be found at http://helpforum.sky.com/t5/tkb/communitypage

     

    I hope this helps.

  • Hi Quelyn, 

     

    The answer to this is in the XML for the TKB page layouts, if you inspect this you'll notice a section of XML before the closing quilt tag similar to below:

     

    <remove from="breadcrumb" for="Header">
    <component id="search-wrapper"/>
    </remove>

     

    This carries across all TKB pages as far as I'm aware and is an out of the box configuration.

     

    You can remove the <component id="search-wrapper"/> line to bring the search field back however you'll notice that it will not default the dropdown to TKB or TKB related content areas instead scoping the granularity of search to the Community.

     

    You should however be able to get around this limitation using JavaScript to change the and default it to Knowledge Base etc on page load.

     

    An example of this can be found at http://helpforum.sky.com/t5/tkb/communitypage

     

    I hope this helps.

    • Quelyn's avatar
      Quelyn
      Genius

      So I removed this part: 

      <remove from="site-navigation" for="Header">
      <component id="common.widget.search-form"/>
      </remove>

       

      Once I did, it added the global search on top, and defaulted to the KB section! It also defaults on board too. So it looks like nothing extra is needed for that!

       

      Thank you!

  • Quelyn - Did you check your TKB page layout? Seems that the header is missing from there. Other reason could be your search bar is under some condition so it doesn't show up in that page.

     

    Could you please post you TKB page layout so I can have a look at it?