Skip to content

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

@peterboorsma

Description

@peterboorsma

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions