Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Current »

Sometimes it is reasonable to use different hawksearch.css file or avoid loading it from Hawksearch server. For example, to use minified version of CSS hawksearch.min.css.

We strongly recommend that you do not change the source code of default Hawksearch and Magento components. All customisations must be implemented in custom modules or themes.

Override hawksearch.css source location

Override view/frontend/templates/hawksearch/proxy/head/js.phtml file with the custom one in current theme folder. Copy original template and place the copy in the following location:

<theme_dir>/HawkSearch_Proxy/templates/hawksearch/proxy/head/js.phtml.

Replace this peace of code

$configViewModel->getHawkUrl('includes/hawksearch.css');

with this one

$configViewModel->getHawkUrl('includes/hawksearch.min.css');

Unload hawksearch.css file

In case you want not to load hawksearch.css file from Hawksearch server please follow these steps:

  1. Place the custom default.xml layout file in the following location
    <theme_dir>/HawkSearch_Proxy/layout

  2. Put the following content in layout file:

    <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
        <body>
            <referenceBlock name="hawksearch.head" remove="true"/>
        </body>
    </page>

  • No labels