Search Results Template

The search results page (also known as the list template) is a simple, high-utility template. It is basically just a list of videos. This template is used for the search results page, and the 'more videos' views of the category and index page if there are more than 10 videos. The list template includes pagination, serving as a video archive. It will paginate with 10 videos per page.

The main building blocks of the search results page are: the header, the list, and the pagination.

  • item_list – list of videos. Use your own item attributes and HTML to make the list look how you want.
  • paginator – pagination that will show up if there are more than 10 videos on the page. {% if is_paginated %}{% paginator %}{% endif %} Use the existing HTML that it generates and customize with CSS.
  • header, query – dynamically displays relevant information depending on whether the pages shows as a search results or an archive page. See example code.
  • hits, first_on_page, last_on_page – displays relevant information on total videos within the search results. (1-10 of 241 videos) See example code.

<h1>{% if header %}{{ header }}{% else %}Videos matching “{{ query }}”{% endif %}</h1>


<p class="displaying">Displaying {{ first_on_page }}-{{ last_on_page }} of {{ hits }} video{{ hits|pluralize }}.</p>


Next section →