Skip to the content
Documentation
Help Start
Reading in:
  • German: 9,113 of 9,113 pages
About the help in other languages
All help pages

Designing search results

How theme designers design the search page of an Exponential site - the form, the result count, one result per class through view modes, no results, long queries, pagination, the advanced search page, and filters when…

Download as PDF

Address: https://doc.exponential.earth/exphelp/viewer/help/theme-designers/designing-search-results.md

On this page

Designing search results

This page is for theme designers who design the search page. Search is a module view, so its page is drawn inside your frame by a search template rather than by a content template. Results are content objects of many classes, drawn one by one in a view mode. The template, its variables and the form fields that must stay are documented in Search results template; this page covers the design decisions.

Contents

  1. The pieces of the page
  2. The form
  3. One result, many classes
  4. Counts and feedback
  5. No results
  6. Pagination
  7. Advanced search
  8. Filters with ezfind
  9. Checks

The pieces of the page

PieceNotes
Heading"Search", or "Results for ..."
Formthe query, kept in the field after searching
Result countannounced to screen readers when it changes
Resultsan ordered list, one view mode per hit
Paginationwith the query kept in the page links
No resultshelp, not a dead end

The kernel's search page is content/search.tpl, which your design overrides; the advanced search page is content/advancedsearch.tpl.

The form

The search field may also live in the header (Designing headers and footers). On the search page, show the full form with a visible label, the query already in the field, and a button with a text label. The form's field names (SearchText and others) must stay as the module expects them; the design changes markup and styles only.

One result, many classes

Each hit is drawn with a view mode (usually line), so an article, a file and an event can each look like themselves. Design a shared skeleton so the list still reads as one list (Designing content listings and cards):

  • the title as a link;
  • a type label (article, PDF, event) where it helps people choose;
  • a date where it matters;
  • a short excerpt, or the intro.

If the search line should differ from the folder line, a separate view mode for search hits is cleaner than conditions inside line (Designing view modes).

Counts and feedback

Show how many results were found and for what query: "24 results for 'opening hours'". The query is visitor input: the template must wash it wherever it is printed. Long queries must wrap, not overflow the heading.

No results

The empty result is the most common search page on many sites. Design it as help:

  • repeat the query and say clearly that nothing was found;
  • suggest checking the spelling, using fewer words, or browsing from the main sections;
  • offer the search field again, with the query in it;
  • optionally link to the front page and the most visited sections.

See also Designing empty and error states.

Pagination

Search results are paged with the shipped navigator templates; the query travels in the page links. Design the pagination like other lists (Designing content listings and cards), and show "Page 2 of 5" so people know where they are.

content/advancedsearch.tpl offers more fields (for example phrase and class). Many sites do not link it at all; decide with the client whether it is needed before designing it.

Filters with ezfind

When an installation uses the ezfind extension with a Solr server, search is answered by Solr and the ezfind search template can show facets, for example the number of results per content class. Design filters only after the developer confirms which search engine the site uses and which facets it will offer; the default kernel search has none (Search: legacy and Solr covers the DXP side, Searching the visitor's view).

Filter design notes:

  • show the count per option, and the active filters with a way to remove each;
  • a filter that would give zero results is better hidden or disabled with an explanation;
  • on small screens, filters go into a panel opened by a button that shows how many are active.

Checks

  • To do: Results, no results, one result and many results drawn.
  • To do: Results of every class that can be found look like one list.
  • To do: Long queries wrap; the query is shown in the field.
  • To do: The count is announced (role="status") and headings make sense to screen readers.
  • To do: Light and dark, three widths, keyboard only.

Become an Exponential Partner

Partners share their information, provide funding, contribute back and develop the products with us, and that is how Exponential grows. A partner website and dashboard are planned for mid-2027: please become a partner today to speed up our growth rate and land new features faster.

Something wrong on this page? Report an error

Documentation license

This documentation is free documentation, licensed under the GNU Free Documentation License 1.3 or later.

Exponential Copyright © 1998-2026 Exponential Foundation and 7x