ASPX templates
Version 6.x > ASPX templates > Smart Search Results with Images View modes: 
User avatar
Member
Member
Yash - 4/25/2013 10:53:15 AM
   
Smart Search Results with Images
Hello,

I am wondering on how could I get the file icon image in the Smart Search Results page? I am getting Teaser Image of the Page but if I have file in the Search Results I would like to show file icon in the search result not the no-image image.

Thanks,
Yash

User avatar
Kentico Support
Kentico Support
kentico_jurajo - 4/26/2013 6:17:57 PM
   
RE:Smart Search Results with Images
Hi,

If you are using CMS.File document type for both images and non-image files, you will have to create a custom function for the transformation that will detect this.

By default, the file attachment field is set as the image source field for the index. So, if image is recognized in this field, this image is used. If there is non-image file uploaded, the no-image picture is displayed. So, basically what you can use is a function which will be used in the GetSearchImageUrl function as the first parameter - this one is used if no image is found. So, your function will return the image according to the file type - PDF, DOC, XLS, etc.

Best regards,
Juraj Ondrus

User avatar
Member
Member
alvalee327-hotmail - 2/20/2014 9:48:53 PM
   
RE:Smart Search Results with Images
I think may be you can read this post first.
http://devnet.kentico.com/forums/f57/fp2/t31766/how-to-get-image-show-in-smartsearch-result