Javascript Setup

SearchPlus includes a javascript helper library to speed up your front-end implementation.

Our helper library makes setting up the search page as simple as a single line :


Of course, there are more options than that, and depending on your specific use case or complexity you might need to roll your own custom javascript.

If this is your first time working with Algolia and SearchPlus, we highly recommend first using the helper to at least get a good grip on the setup and possibilities.

Just looking for the helper reference : Helper Reference

Include the Javascript Libraries #

The js helper can be included on your build in two possible ways :


{% includeJsFile resourceUrl('searchplus/js/searchplus-combined.min.js') %}

OR Seperately

(Also useful if you'd like to deliver via the CDN of your choice)

{% includeJsFile resourceUrl('searchplus/js/algoliasearch.min.js') %}
{% includeJsFile resourceUrl('searchplus/js/algoliasearch.helper.min.js') %}
{% includeJsFile resourceUrl('searchplus/js/hogan.min.js') %}
{% includeJsFile resourceUrl('searchplus/js/searchplus.js') %}

We also require jQuery for our helper. Need a jQuery free version? Get in touch and we'll see what can be done.

Add the JS Init #

At it's most basic, this is a single line of js :


For all the possible javascript options available with our helper, check the full javascript helper reference :

[Helper Reference]