London Dev Meetup Rescheduled! Due to unavoidable reasons, the event has been moved to 21st May. Speakers remain the same—any changes will be communicated. Seats are limited—register here to secure your spot!
AI OnAI Off
London Dev Meetup Rescheduled! Due to unavoidable reasons, the event has been moved to 21st May. Speakers remain the same—any changes will be communicated. Seats are limited—register here to secure your spot!
Hi Markus.
When the SearchDataSource adds a file to the search result, a property named IconPath is added. So you could check each PageData object in the search result if this property exists.
If the extension is not found(I think EPiServer will check for .bmp, .doc, .gif, .htm, .html, .jpeg, .jpg, .pdf, .ppt, .tiff, .xls), /App_Themes/Default/Images/Extensions/Default.gif will be used.
Hope this helps!
Br, Tore
How can I add the functionality that showed file icons in search results? It existed in EPiServer 4.x, "<FileTemplate>".
I've tried to find something in the page data(from the search results) which tells that it's a file. The only thing I can think of is that the LinkURL contains a path from the SearchLocations in the SearchDataSource.
Is there a simpler way of doing this?