6

I've added a Results Count component to my search results page.

Searching, autocompletion, page selector etc all works perfectly, but I cannot get the Results Count to show a number of found results; it just displays the text I entered in the Results count text field.

I triend adding {0} as a placeholder to the text but to no avail.

Secondly, how do I get rid of the progress bar element shown below?

Thank you so much for your help!

results count not showing number of results, grey progress bar

3 Answers 3

7

The Results Count rendering script is looking for {count} string in the text you've provided. And it replaces this with the number of results. So type something like: "The number of results is: {count}" inside of Results count text field of Results Count rendering configuration item.

1
  • You're a lifesaver. Thank you! Do you know how to get rid of the progress element I showed in the screenshot? Even when the count is shown correctly this is still rendered. Sep 14, 2017 at 11:13
1

For the progress bar, you will have to remove it in the ResultsCount.cshtml file or just hide it with CSS.

0

I guess it's a placeholder for showing some kind of progress/loading animation when fetching the results async.

There is no way of disabling it, so (like most with SXA components), you will have to edit the cshtml or use display:none or someting. This thing really should have been set-up in the rendering variant if you ask me.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.