Kentico CMS Search Results

How do I change the search settings of Kentico CMS to display part of the text from search results, as in Google? Currently, it shows only the path in the results.

+3
source share
3 answers

It depends on how you really tuned in.

At the page level, if you use the Portal Engine model that most people use now, you need to check the widget that you use, basically it comes down to regular search or smart search.

ASPX, , , , usercontrol ~/CMSWebParts/Search/ ~/CMSWebParts/SmartSearch/

, , . , :

CMS.Root.SearchResults CMS.Root.SmartSearchResults CMS.Root.SmartSearchResultsWithImages

" " , Call to SearchHighlight, , "". , . , , "" "". "".

, , , CMSSiteManager → Administation → Smart Search. , . , ( , ). , , .

+4

, , @jao, 280 . , 280 , .

+1

:

<p>
<%# SearchHighlight(HTMLHelper.HTMLEncode(TextHelper.LimitLength(HttpUtility.HtmlDecode(HTMLHelper.StripTags(GetSearchedContent(DataHelper.GetNotEmpty(Eval("Content"),"")),false, " ")), 280, "...")),"<span style=\"background-color: #FEFF8F\">","</span>") %>
</p>

280 , .

0

Source: https://habr.com/ru/post/1740841/


All Articles