I'm trying to show the results of a page crawler index the results are fine but the problem is that when I try to show the content value is empty I'm using OnHtmlToPlainText method in a class for filter content.
This is the code of the transformation @div class="content"@
@%#SearchHighlight(HTMLHelper.HTMLEncode(TextHelper.LimitLength(HttpUtility.HtmlDecode(HTMLHelper.StripTags(CMS.Base.Web.UI.ControlsHelper.RemoveDynamicControls(GetSearchedContent(DataHelper.GetNotEmpty(Eval("CONTENT"), ""))), false, true, " ", "@", "")), 280, "...")), "@span style='background-color: #FEFF8F'@", "@/span@")%@@br /@
@/div@@!-- content --@
this is the backend codepublic class CustomSearchCrawlerModule : CMS.DataEngine.Module
{
private void OnGetPageContent(object sender, DocumentSearchEventArgs e)
{
SearchField sf=new SearchField();
sf.FieldName = "CONTENT";
sf.Value = e.Content;
string content = e.Content;
e.SearchDocument.AddSearchField(sf);
}
}
Any advice , please
↧