AI OnAI Off
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?