Reputation: 1256
How can i modify the smart search transformation to also display a file description with results. I assume it's this line that needs to be modified:
<%#SearchHighlight(HTMLHelper.HTMLEncode(TextHelper.LimitLength(HttpUtility.HtmlDecode(HTMLHelper.StripTags(CMS.ExtendedControls.ControlsHelper.RemoveDynamicControls(GetSearchedContent(DataHelper.GetNotEmpty(Eval("Content"), ""))), false, " ")), 150, "...")), "<span class='searchTerm'>", "</span>")%>
The File page type uses 'FileDescription' for the description, and this seems to be getting indexed, i'm just at a loss on displaying this.
Upvotes: 0
Views: 127
Reputation: 176
You need to use FileDescription as column name.
<%# GetSearchValue("FileDescription") %>
So to be complete, here is your code with the FileDescription column added:
<%#SearchHighlight(HTMLHelper.HTMLEncode(TextHelper.LimitLength(HttpUtility.HtmlDecode(HTMLHelper.StripTags(CMS.ExtendedControls.ControlsHelper.RemoveDynamicControls(GetSearchedContent(DataHelper.GetNotEmpty(GetSearchValue("FileDescription"),
> ""))), false, " ")), 150, "...")), "<span class='searchTerm'>",
> "</span>")%>
Upvotes: 1