Search templates
Introduction
Funnelback provides a templating system to allow the customisation of search results that are delivered using the HTML search endpoint.
This allows an administrator to adapt the search results display to any HTML design, and also to output the search results in other text based formats such as CSV or customised XML or JSON.
Funnelback uses the Freemarker templating language to define the search templates. These templates look like HTML files with additional custom tags - anyone familiar with editing HTML will be able to understand the Freemarker template code. The Freemarker documentation should be read to assist in understanding the Funnelback templates.
Each search results template must handle two cases covering what to present to the end user before and after a search is run.
Search template customisation and management
Search templates control how the search results are formatted for end users. This includes changing the styling and layout of the search results page as well as providing the search results in alternate formats such as CSV.
Search templates can also be created and edited in the editor of your choice by mounting Funnelback on your computer using a compatible WebDAV client.
See:
- manage configuration files, templates and web resources using WebDAV
- search template customisation
- Freemarker template language
- Funnelback data model
Web resources
Funnelback provides a web resources folder for each profile that can be used to store linked resources such as CSS, image and JavaScript files.
See: web resources
Template "not found" screen
A default message is presented if the defined template does not exist. This can be fully customised, however, the customisation is server-wide.
See: template not found screen.
Debugging search template errors
Search templates will fail with an error if the template contains syntax errors or references to undefined variables. Funnelback provides a number of ways to debug template errors.
See: template debugging
See also
- Contextual navigation
- Faceted navigation
- Freemarker template language
- Funnelback data model
- Integrating search with your website
- RSS template - return search results as an RSS feed.