Open topic with navigation

# Configure Templates in Find

You can configure Find to use a custom template to display results and promotions in the search results list, and metadata in the preview panel. For example, you might want to use a larger thumbnail image and title in the result list, and to remove the summary.

You configure how Find uses the custom templates by using the `templates.json` configuration file, in the `customization` directory in your Find installation home directory. This configuration file contains JSON objects that allow you to configure different aspects of the Find results.

TIP:

If you belong to the FindAdmin role, you can reload the template configuration to make any configuration changes available to your users without restarting Find.

To reload the template configuration, you must send the following API call to Find directly, by typing the URL into your Web browser address bar. You must be logged into Find as a user with the FindAdmin role in the same Web browser, because Find uses the session cookie to authorize the action.

    http://FindURL/api/admin/customization/config/reload

Where `FindURL` is the URL of your Find server.

This option also reloads any other customization configurations (for example, dashboards).

The following table describes the configuration objects that you can include in your template configuration file. These objects are all optional.

Object | Type | Description
--- | --- | ---
`searchResult` | Array | Defines the templates to use for search result items in the results list.
`promotion` | Array | Defines the templates to use for promotion items in the results list.
`previewPanel` | Array | Defines the templates to use for document metadata in the preview panel.
`entitySearch` | Array | Defines the templates to use for the entity search dialog box.

In each of these objects, you specify an array of template configurations, each of which specifies the template file to use and the circumstances in which to use the template.

The following table lists the configuration properties that you can use to specify a template.

Property | Required | Type | Description
--- | --- | --- | ---
`file` | Yes | String | The template file name. See Create Template Files.
`triggers` | Yes | Object Array | The triggers that specify when to use a template. This object contains the following properties: `field`. The field ID (the key in the `fieldsInfo` section of the Find configuration file). `values`. An array of field values that the specified field must contain for the trigger to activate. A document activates the trigger if it contains at least one of the specified values in the specified field. If the list of values is empty, a document activates the trigger if it contains any value in the specified field. You can specify multiple field conditions in the trigger. In this case, a document must match all the specified field conditions to activate the trigger.

When displaying results, Find processes the templates in the order that you list them in the configuration file. For a particular document, Find uses the first template that the document matches. If there are no matching templates in your configuration, Find displays the result with the application default template.

The following example shows a simple search result configuration that applies to documents that contain the value Living people in the categories field.

    {
       "searchResult": [
          {
             "file": "person.handlebars",
             "triggers": [
                {
                   "field": "categories",
                   "values": ["Living people"]
                }
             ]
          }
       ]
    }

© 2015-2018 EntIT Software LLC, a Micro Focus company | Send documentation feedback to Micro Focus Close Send documentation feedback To open the configured email client on this computer, open an email window. Otherwise, copy the information below to a web mail client, and send this email to swpdl.idoldocsfeedback@microfocus.com. We appreciate your feedback! Product: Topic Title: Help Topic: Feedback:

_FT_HTML5_bannerTitle.htm