I have a search results page where I am using the Results Count rendering. I know that it has There are {count} results
as a rendering parameter
- but if there are no results then my search results is outputting No results
and the results count is showing There are 0 results
, so I don't want to show the results count message in this instance.
I cannot see anything obvious on the Model that I could check if the Count equalled 0.
@model Sitecore.XA.Feature.Search.Models.SearchResultsCountRenderingModel
<div @Html.Sxa().Component(Model.Rendering.RenderingCssClass ?? "search-results-count", Model.Attributes) data-properties='@Model.JsonDataProperties'>
<div class="component-content">
@Model.MessageIsEmpty
<div class="results-count">
@Html.Sxa().Field(Model.FieldName, Model.DataSourceItem, !Model.IsControlEditable)
</div>
<div class="progress"></div>
</div>
</div>