# Advanced Customization

# Modules and Layouts Overrides

XT Search has support of Joomla! overrides of module templates and layouts. To give you a concrete example of how it works, let say that you want to override one of the layouts of the Autocomplete Classic module, and you also need to enable the "No Results" layout (enabled in the advanced parameters).

By default, the original files are found in these locations:

  • modules/mod_xtdir4alg_autocomplete/tmpl/default-bs3.php
  • administrator/components/com_xtdir4alg/layouts/xtdir4alg/partial-no-results-autocomplete-template.php

The link between both files can be found in default-bs3.php:

To create your own module layout with a personal "No Results" layout, you create the following files:

  • templates/my-template/html/mod_xtdir4alg_autocomplete/default-bs3.php
  • templates/my-template/html/layouts/mylayouts-for-search/partial-no-results-autocomplete-template.php

The link between them is defined in default-bs3.php in this way:

For reference:

# Algolia Customization

Once you become familiar with Algolia, XT Search and the associated modules, there is more one level of customization that can be achieved to configure the User Interface Widgets.

In the Algolia Documentation, you can discover how powerful and flexible is the service:

In our experience to combine the basic module configuration and the Algolia Widget API, we have added the following features:

# Extra Facets

In the module configuration, you can define Facets based on the core fields. However, you can also manually add more facets and customize them.

This is a sample facet that can be added to the page:

# Custom sortBy

Once the core facets are defined, you can define a different sort method. For example:

# Custom transformData

With this method, you can transfor the retrieved data to a different representation. For instance:

# Custom templatesItem

Each item of a facet can filtered or formatted to implement a different need. For instance, this is a template item for a cloud of tags: