Count Result of search

web dev asked on November 13, 2018 11:36

hello Kentico Dev in smart search result i try to display result like this(18 results found for "search keyword") i find macro <div class='ResultCount'><%# Eval("Items") + " result(s) for " + CMS.Helpers.URLHelper.GetUrlParameter(CMS.Helpers.RequestContext.CurrentURL,"searchtext") %></div> but its not work in transformation is there any way to display reult found

thank you

Correct Answer

David te Kloese answered on November 13, 2018 13:19

Hi Where are you placing this? Since the transformation is used for every result item... and I don't think your want the number of result on every line.


as for the second part you are outputing the data from the query string directly in your html, beware of injection of scripts or html.

0 votesVote for this answer Unmark Correct answer

   Please, sign in to be able to submit a new answer.