<% if @search_results.blank? %>
<%=raw _t('search_result_page.no_results', :query => h(params[:query])) %>
<% else %>
<% if options[:show_heading] %>
<%=raw _t("search_result_page.result_heading", :query => h(params[:query])) %>
<% end %>
<% if options[:show_result_count] %>
<%=raw _t("search_result_page.result_count", :count => @search_results.length) %>
<% end %>
<% @search_results.each do |search_result| %>
<% result = search_result.highlight(
"*#{params[:query]}*", {
:field => (search_result.class.name == "Alchemy::EssenceRichtext" ? :stripped_body : :body)
}
) %>
<%= render 'alchemy/search/result', :result => result, :options => options, :page => search_result.page %>
<% end %>
<% end %>