Portal Engine Questions on portal engine and web parts.
Version 7.x > Portal Engine > Changing Display of Search Results View modes: 
User avatar
Member
Member
Armysniper89 - 3/26/2013 9:45:40 AM
   
Changing Display of Search Results
Is it possible to have it so that when someone searches for Article document types or other document types, that the "Teaser" assigned to it is displayed in the search results even if it does not contain the text they searched for? So if the text they searched for is in the article body but not in the teaser, they still want the teaser to show up regardless.

User avatar
Kentico Support
Kentico Support
kentico_filipl - 3/26/2013 10:46:43 AM
   
RE:Changing Display of Search Results
Hello,

It is possible to achieve such functionality of Smart search web parts. All you need to do is create a new transformation for the selected web part (e.g. Smart search results, Smart search dialog with results) and put the field to be rendered in there. This can be done using macro Eval - it should look like this :
<%# Eval("ArticleTeaserText") %>

Further details about transformations can be found in Developer's Guide - Transformations.

Best regards,
Filip Ligac

User avatar
Member
Member
Armysniper89 - 4/1/2013 10:49:07 PM
   
RE:Changing Display of Search Results
What about pages and document types that dont have an ArticleTeaserText field?

User avatar
Kentico Support
Kentico Support
kentico_jurajo - 4/1/2013 10:59:57 PM
   
RE:Changing Display of Search Results
Hi,

You need to set for given document type the search fields so the image field will be used. Or, use the same name for the teaser field for all document types.

search field settings

Best regards,
Juraj Ondrus