SearchDataSource and file icons?

Vote:
 

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?

 

#33112
Oct 02, 2009 8:43
Vote:
 

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 

#33113
Oct 02, 2009 9:22
Vote:
 
#33114
Oct 02, 2009 9:25
Vote:
 
Thank you both, sovled it by using Øyvinds link Smile
#33115
Oct 02, 2009 10:29
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.