Search Results Custom Link
I have several hundred "Vehicle" content items. These items are not linked to any page directly, instead there is a single page with a custom widget which reads and displays a specific Vehicle based on querystring ID e.g. /display-vehicle?VehicleId=4EE2CDAD-E682-4282-8B96-E93342755892. There is a search index on these "Vehicle" items. There is a page with a search input that uses this index and a search results widget that displays the results of a search.
As the "Vehicle" content items are not linked to a page the links in the search results do not work (empty href). I would like to customise the link so that it references "/display-vehicle?VehicleID=ID".
I understand that the solution may be to write a custom widget that inherits the SearchResults class but am stuggling to find any official documentation aside from forum posts.
I was thinking too much about it. The search results expose the ID of the content item so I can just modify the <a> tag as below.