/
Customisation

Customisation

Front-end customisation

The extension is prebuilt with Hawksearch Vue SDK and uses vue-hawksearch-app bundler to consolidate all dependencies in one file. The bundled JS file is located in view/frontend/web/js/vue-hawksearch-app.js file.

Customise JS components

There is a possibility to customise Vue components and re-pack the vue-hawksearch-app.js using npm. Read details about rebuilding vue-hawksearch-app.js in vue-hawksearch-app project directory.

Customise Vue templates

Vue components' templates are loaded into before.body.end block in hawksearch_esindexing_components layout handler. You can rewrite any existing template or add new templates in your own theme.

Steps to override Vue template:

  1. Create .phtml file and load it into before.body.end block in hawksearch_esindexing_components layout handler.

  2. Create the markup for the component template in .phtml file. Replace <component-name> with the name of overriding component

    <script id="vue-hawksearch-<component-name>" type="x-template"> <!-- Component template code --> </script>

See an example of overriding https://bridgeline.atlassian.net/wiki/spaces/CON/pages/3468471228.

Find the list of all available components in https://bridgeline.atlassian.net/wiki/spaces/CON/pages/3468468185 or in vue-hawksearch/src/components folder on GitHub.

 

Related content

Custom Select Component
Custom Select Component
Read with this
Customize search results in Vue.js
Customize search results in Vue.js
More like this
Search tuning
Search tuning
Read with this
Customize search box in Vue.js
Customize search box in Vue.js
More like this
Example: Overriding the Popular searches component to add a custom label
Example: Overriding the Popular searches component to add a custom label
More like this
Extending the Vuex store
Extending the Vuex store
More like this