1

I included the following code in Item_Default.html of Display Template.

My javascript is getting called successfully on site Search and it is working fine. but it is not working on Find a File inline search of document library.

Is there any other template being used for inline search (search box in listview webpart)?

<script> 
    $includeScript(this.url, "~sitecollection/_catalogs/masterpage/Display Templates/Search/CustomSearchHideFolder.js") 
</script>

1 Answer 1

0

"Find a File" or "Find an item" search boxes in list web part does not uses any display templates.

However if you want to use custom display template and search the files from single document library then you can use the combination result source, search box and search results web part to achieve this functionality.

Useful links:

  1. How to use Search Box web part to search of list only.

  2. Configure result search web part to show documents from specific document library

  3. Display template reference in SharePoint Server.

1
  • 1
    cant go for custom Search box/ search results webpart. Let me know if you have any idea to apply custom script to 'Find a File' inline search Nov 6, 2018 at 9:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.