Versions Compared

Key

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

...

Code Block
languagehtml
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8" />
    <title>Hawksearch Handlebars UI</title>
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <script type="text/javascript">
      var Hawksearch = Hawksearch || {};

      Hawksearch.config = {
        clientId: "f51060e1c38446f0bacdf283390c37e8"
      };
    </script>
    <script src="//cdn.jsdelivr.net/npm/@bridgeline-digital/hawksearch-handlebars-ui@1.0.1112/dist/hawksearch-handlebars-ui.js" defer></script>
  </head>

  <body>
    <h1>Hawksearch Handlebars UI</h1>
    <hawksearch-search-field></hawksearch-search-field>
    <hawksearch-search-results></hawksearch-search-results>
  </body>
</html>

...

Code Block
languagetypescript
interface HawksearchConfig {
    clientId: string;
    breakpoints?: {
        tablet: number;
        desktop: number;
    };
    css?: {
        customStyles?: string | Array<string>;
        defaultStyles?: boolean;
    };
    endpoints?: {
        search: string;
        tracking: string;
    };
    fieldMappings?: {
        description?: string;
        imageUrl?: string;
        price?: string;
        salePrice?: string;
        title?: string;
        type?: string;
        url?: string;
    };
    formatting?: {
        cultureIsoCode?: string;
        currencyIsoCode?: string;
    };
    placeholderImageUrl?: string;
    queryStringMappings?: {
        disableSpellcheck?: string;
        facet?: string;
        page?: string;
        pageSize?: string;
        query?: string;
        searchWithin?: string;
        sort?: string;
    };
    searchUrl?: string;
    templates?: HawksearchTemplates;
    trackingEnabled?: boolean;
    urlPrefixes?: {
        assets?: string;
        content?: string;
    };
}

...

Property

Required

Default Value

clientId

Yes

The ID of your Hawksearch installation

placeholderImageUrl

No

The URL of an image to load if the image associated with a search result fails to load

searchUrl

No

/search

The URL of the search results page

trackingEnabled

No

true

Allows you to specify whether user actions are tracked for analytical purposes

...