Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
{% search_results "<search query>" %}

  {% for post in search_results %}
    <h3><a href="{{ post.url }}">{{ post.title }}</a></h3>
    <hr>
  {% endfor %}

{% endsearch_results %}

Use request.query_object to use a search term passed as a URL parameter.

The block accepts the following extra optional parameters:

  • size, e.g. size: 50. The maximum search results, so the request load time can be limited, even when there is a very large amount of search results. Default: 100.