Download the PHP package madmatt/silverstripe-funnelback without Composer
On this page you can find all versions of the php package madmatt/silverstripe-funnelback. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download madmatt/silverstripe-funnelback
More information about madmatt/silverstripe-funnelback
Files in madmatt/silverstripe-funnelback
Package silverstripe-funnelback
Short Description Provides an interface to search a Funnelback collection
License BSD-3-Clause
Informations about the package silverstripe-funnelback
Silverstripe Funnelback search module
This module provides an interface to query a Funnelback collection.
Features
Current features
- Search a single Funnelback collection by one or more keywords
- Present paginated search results to users
- Has been tested and known to work with Funnelback version 15.
You can see this module in action on the Whaikaha - Ministry of Disabled People website.
Still to do
- Identify a search result in the database and provide the most up-to-date content for the results page
- Ability to filter or facet information (reliant on Funnelback supporting this)
What this module won't try to do
- Index content into a Funnelback collection. Instead, use the silverstripe-search-service module and add your own Funnelback search service, OR have Funnelback crawl your website directly.
Installation
Install this module via Composer:
Requirements
You need to be using Silverstripe CMS 4.10 or newer, no other dependencies should matter.
Usage
Once you've installed the module, you'll need to do two things:
- Configure the necessary environment variables.
- Create & integrate your search form.
Step 1: Configuring the necessary environment variables
This module needs the following environment variables configured:
SS_FUNNELBACK_URL
: The base URL to the Funnelback API endpoint, without any trailing slashes or path. For example, https://example-uat-search.squiz.cloudSS_FUNNELBACK_USERNAME
: The username provided by Funnelback.SS_FUNNELBACK_PASSWORD
: The password provided by Funnelback.SS_FUNNELBACK_COLLECTION
: The name of the collection (e.g. example-collection).
Once configured, the module can be used to perform search requests.
Step 2: Create & integrate your search form
You may already have some search infrastructure in place. If so, adapt these instructions as needed. This assumes you have nothing setup yet.
Create a new controller for your search page - app/src/Controllers/SearchController.php
:
Next, register your new controller via a Director
route, for example in app/_config/routes.yml
:
Create your search results template (for example themes/<theme>/templates/App/Search/Layout/Search.ss
):
Now, assuming that Funnelback has already crawled your website, you should be able to visit http://your-website/search?q=testing
and have the website query Funnelback and return results for you.
On your PageController
class, add the following SearchForm
method so that you can output a search form on every page of your website:
Finally, add this into your template:
Provided everything is configured correctly, you should now have everything you need to get Funnelback search working on your website.
Optional configuration
Optional configuration options are listed below.
Code of Conduct
When having discussions about this module, please adhere to the Silverstripe Community Code of Conduct.
All versions of silverstripe-funnelback with dependencies
guzzlehttp/guzzle Version ^7.4
silverstripe/config Version ^1
silverstripe/framework Version ^4.10