Powrót do panelu

Dokumentacja

Dowiedz się, jak korzystać z Asyntai

AI Search for Craft CMS

Install our Craft plugin to put the AI Search Bar on your site

Open AI Search Bar

Overview

A Craft site is built around its entries, and visitors know what they want but not what you called it. They type "when are you open at the weekend" and your search finds nothing, because none of those words is in the title of your Opening hours entry. The AI Search Bar answers what they mean, and finds it.

The plugin puts the bar on your site without any template work. We read your entries and pages ourselves, so there is no API key to create and nothing to paste.

Requirements

  • Craft CMS 4.0 or later, or Craft CMS 5.0 or later.
  • PHP 8.0.2 or later.
  • Your server has to be able to make outgoing HTTPS requests, because the plugin talks to us directly. Most hosts allow this.

Installing the Plugin

From the Plugin Store inside your control panel, search for Asyntai AI Search and press Install. Or, with Composer:

composer require asyntai/craft-ai-search
php craft plugin/install asyntai-search
  1. In the control panel, open Asyntai AI Search in the sidebar.
  2. Press Connect Asyntai. A window opens where you sign in or create a free account.
  3. Wait a few minutes while we read your site. The plugin screen tells you when the bar is live.

Choosing Where the Bar Appears

There is one setting, Where the bar goes, with two answers.

In place of my search box

The bar finds the search form your templates already render, hides it, and takes exactly the same place. Nothing in your templates has to be edited. If a visitor presses Enter without picking a result, your usual search page still opens, so nothing they already know stops working.

A Craft site has exactly the search box its developer wrote, and some have none. On a site like that this setting has nothing to replace, and the plugin screen says so. Put the bar in your templates instead.

Only where my templates put it

Add this to a template, where the bar should appear:

{{ asyntaiSearchBar() }}

It prints a container the bar renders into, and it prints nothing at all while the bar is off, so your template is left exactly as it was. Your own CSS styles the container, so the bar sits in the layout like anything else you put there.

The Other Settings

  • Search box to replace. Leave it empty and we find the form ourselves. Fill in a CSS selector only if we pick the wrong one, for example header form[role=search].
  • Placeholder text. Leave it empty and each visitor sees it in their own language.
  • Accent colour. Leave it empty to use the colour set in your Asyntai dashboard.

Project Config

The four settings above are plugin settings, so Craft stores them in project config like every other setting. On an environment where allowAdminChanges is off, the plugin screen shows them read only. Change them where project config is editable, then deploy, the same as you would for any plugin.

The connection itself is not in project config. The plugin keeps it in its own database table, so connecting works on every environment, and nothing secret is ever committed or deployed.

Trying It Before Your Visitors Do

The plugin screen has a Try your search bar button. It opens your real search bar, on your real content, in a new tab. Searches you run there do not count against your monthly allowance.

Plans and Limits

A site connected through this plugin runs the bar on any plan, including the free one. Your monthly reply allowance still applies, and searches and chat replies share it. The plugin screen shows how much of the month is left.

When the allowance runs out, the bar removes itself and your own search box comes straight back. Your visitors keep being able to search. They are never left typing into a box that answers nothing.

The plugin checks this in the background, so the bar comes back by itself when your allowance resets. You do not have to update or reinstall anything.

What the Bar Searches

Your entries and pages, as we read them from your site. If you run Craft Commerce, its product pages are read the same way, because they are pages on your site.

If Something Does Not Work

  • No bar appears. Open the plugin screen and read the line under the coloured dot. It says exactly why the bar is off.
  • It says your templates have no search box. Add {{ asyntaiSearchBar() }} to a template, and set Where the bar goes to Only where my templates put it.
  • Could not reach Asyntai. Your server cannot make outgoing HTTPS requests. Ask your host to allow them.
  • The bar replaced the wrong element. Fill in Search box to replace with a CSS selector for the right one.
  • The settings are greyed out. This environment has allowAdminChanges off. Change the settings on your development environment and deploy the project config.
  • Craft signed you out during the connect step. Log in again and press Connect once more.

Disconnecting

Press Disconnect this site on the plugin screen. The bar stops at once and your usual search takes over. Uninstalling the plugin removes everything it added, including its own database table.

Using the Chatbot as Well

This plugin adds the search bar only. To add the chat assistant too, install our separate Craft chatbot plugin. The two work side by side on the same pages and share the same knowledge base.