Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Example {{ searchresult.no_of_results }} does not work #1269

Open
peterboorsma opened this issue Oct 24, 2022 · 1 comment
Open

Example {{ searchresult.no_of_results }} does not work #1269

peterboorsma opened this issue Oct 24, 2022 · 1 comment

Comments

@peterboorsma
Copy link
Contributor

On this page:
https://docs.boltcms.io/5.0/templating/content-search#setcontent-search

is an example usecase:

{% if records|length == 0 %}
    <p>
        {{ searchresult.no_of_results }} results for {{ searchTerm }} found.
    </p>
{% else %}
...
{% endif %}

But {{ searchresult.no_of_results }} returns an error:
Variable "searchresult" does not exist.

@shadowbytefox
Copy link
Contributor

Hey @peterboorsma :)

Can you show us how you invoke the search and what your configuration looks like for the global search?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants