---
title: Display content based on whether there are query results
slug: '1387'
canonical_url: https://docs.coveo.com/en/1387/
collection: javascript-search-framework
source_format: adoc
---
# Display content based on whether there are query results
You may want to render custom content in the query summary or in a result list only when the query doesn't yield any results (or alternatively, only when it _does_ yield some results).
## Customizing the no results message
[jsui-new Coveo JavaScript Search Framework v2.4609.6]
The [`enableNoResultsFoundMessage`](https://coveo.github.io/search-ui/components/querysummary.html#options.enablenoresultsfoundmessage) and [`noResultsFoundMessage`](https://coveo.github.io/search-ui/components/querysummary.html#options.noresultsfoundmessage) options of the [`QuerySummary`](https://coveo.github.io/search-ui/components/querysummary.html) component allow you to specify a custom message to display when the query returns no results.
You can use the `+$[query](https://docs.coveo.com/en/231/)+` variable to inject the current [basic query expression](https://docs.coveo.com/en/178/) in your custom message.
```html
```
You can further customize the no results message by embedding one or more HTML blocks with the `coveo-show-if-no-results` class within the element bound to the `QuerySummary` component.
```html
However, $[query](https://docs.coveo.com/en/231/) does remind me of the following cute kitten:
Results, yay :)
I feel empty :(