I would like to change the url link/path that is returned in search results based on the list name. I have downloaded a copy of the Control_SearchResults and the item_Default templates i just don't know what to change in these files

Currently let us say i have the below url returned


I would like to change it to


or /sites/mySite/Lists/NewsType/DispForm.aspx?ID=2

I would like to change it to


Any ideas how to do this or any resources would be appreciated.

Thanks in Advance


You could customize below file to change the url/Path.

enter image description here

enter image description here

You could check below thread for demo.


  • Thanks Lee and i got to that display template but not sure how i can customise it to suit my needs e.g if the results is from a particular list e.g reports change the url to my custom page e.g /MySite/ItemPages/reports.aspx?bid=1. So i need the item ID too. Any ideas? – naijacoder Jan 16 '20 at 3:51
  • Use developer tool, you could debug the variables(item_yourdisplaytemplate.js), so you could inject custom JavaScript to check the url, if url continas list(ItemPages), then update it. – Lee_MSFT Jan 16 '20 at 6:04

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.