How to customise the Control_SearchResults.html to change the href link
-
08-02-2021 - |
Question
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
/sites/mySite/Lists/EventType/DispForm.aspx?ID=2
I would like to change it to
/sites/mySite/Item/custombul.aspx?bId=5
or /sites/mySite/Lists/NewsType/DispForm.aspx?ID=2
I would like to change it to
/sites/mySite/Item/customNewsType.aspx?bId=5
Any ideas how to do this or any resources would be appreciated.
Thanks in Advance
La solution
You could customize below file to change the url/Path.
You could check below thread for demo.
https://medium.com/@frankchen2016/apply-custom-logic-for-all-display-templates-a0100ec7beeb