The Service Directory Search template provides a range of filter and keyword options that can be used to search for services. Once the search results return, further filters can be applied, such as location and service category. Results can also be viewed on a map.
The Service Directory Search uses the Event Search template, switched into "Services" mode. The configuration is the same for both modes, but the documentation has been repeated here for convenience.
Search Mode
If your website has the Service template installed a drop-down will appear at the top of the Event Search article extras. You can choose whether or not the search should return services or events (it cannot return both).
Page Title and Content
An article using the Event Search template displays its page title and content as per the Default template. It does not display the standard related asset blocks.
The Search Controls
The search control appears beneath the standard page content. The control can be configured to display up to three pre-search filters. The filters and keyword can be used in any combination.
For example, if you select a category and perform a search, all services in the category will be returned. If you enter a keyword and select both a location and a category, only services that contain the keyword and match the category and location will be returned.
Category
The category filters display a drop-down of possible categories. Services are assigned a category by tagging them with metadata values. This can be done by relating metadata to your Service article in iCM, or via checkboxes on the Contribute Service form.
Keyword
When used without filters the keyword search performs a search for services in all categories at all locations.
After the first three characters of a search term have been entered, up to five search suggestions are displayed in a drop-down list beneath the text input box. As each character after the third is entered, the list updates. Selecting a suggestion will perform a search based upon that suggestion, ignoring any category or date filters.
Search Results
Search results are displayed beneath the search control. Users are able to view the results as a list or plotted on a map. The results include a sort control and additional post-search filters. The "Page Size" setting in the article extras can limit the number of results displayed per page.
If the article extras are set to use "Browse mode" services are displayed alphabetically before a search is performed. If browse mode is disabled no results are displayed until a search is performed.
View as a List
In the list view each service displays its article heading, first related image and address details from the service article extras.
View on a Map
In map view the map begins zoomed to fit all results with appropriate clustering.
Clicking on a numbered cluster zooms the map to that location.
If a pin has a + symbol it indicates that there are multiple results at a location.
Clicking the pin causes it to spider our, with a pin for each service.
Each pin can then be clicked on to view information about the service.
Result Filters
Once a search has been performed, additional filters can be applied to the results. Up to three filters can be displayed to the user, based upon the event type/category and the service location.Category Filters
Services are assigned a category by tagging them with metadata values.
Configured filters are only displayed if the search results include services that have been tagged with metadata values that match those of the filter. Each filter displays the number of results which match that filter type.
Clicking on a filter will apply it to the results, only displaying the results that match the filter.
Location Filters
The location filter displays an alphabetical list of locations at which services returned by the search take place. The values within the location filter are automatically generated based upon the result list.
Clicking on a location filter will apply it to the results, only displaying the results that match that location.
Removing Filters
Once filters have been applied they are listed above the remaining filters. Clicking an applied filter will clear it. Clicking "Clear All" will remove all filters, displaying the original search results.
Setting Up the Search
The article extras of the Event Search control the number of results displayed per page, the articles that will be searched, and filters available before and after searching.
Event Search Article Extras
- Page size - The number of results to show per page
- Enable keyword search - Whether or not the keyword search box appears
- Browse mode - If "No" no results will be displayed until a search has been performed. If "Yes" the results will show a list of all services as if a keyword wildcard (*) search had been performed, respecting any other constraints that have been set up
- Root articles - Use the select buttons to browse the iCM article tree and select any number of articles. The search will return results for all articles beneath these root items
- Number of pre-filters - 0-3 pre-filters can be configured
- Number of post-filters - 0-3 post-filters can be configured
Pre-Filters
Pre-filters are displayed in the search control. They allow a user to restrict their search to certain categories or locations. Up to four filters can be included.
Metadata Filter
When services are created they can be tagged with metadata values. These values are generally used to categorise services. The metadata type filter allows a user to restrict their search to a certain category (metadata value) of service.Enter a name for your filter in the filter label box. This will appear above the metadata filter drop-down. If no label is entered, none will appear.
Use the select button to browse the metadata library. Select the metadata values you would like to appear as options in the filter drop-down. Note, you will need to be aware of the metadata values used by the services beneath the search root articles. The values you select will appear in the search control drop-down whether or not they are used by any services.
We recommend setting up dedicated service metadata groups and properties, as in the accompanying screenshot. This would allow a metadata filter called film to be created, with each of the film-type values selected as filter options.
The text entered in the "All option" can be used to override the default text "All".
Location Filter
This filter lets you select a number of location articles. The location articles you pick will appear in a drop-down and can be used to limit the services returned. Note that even if there are no services at a location, it will still appear in the drop-down.
The text entered in the "All option" can be used to override the default text "All".
Result Filters
You can set up result filters in the article extras of the Event Search.
Filter Labels
Enter a filter label. This text will appear above the list of filters on the search result page. If no label is entered, none will appear.
Location Filter
Select location as the filter type. No further configuration is needed - the location filter will be built automatically from the locations returned by the search.
Metadata Filters
Post-search metadata filters behave in the same way as pre-search metadata filters with the following exceptions:
- There is no "All" option as the search has already been performed
- The metadata values selected will only appear in the available filters of the search results contain items tagged with that metadata value. That is, it will never be possible to configure a zero result filter.
Article Extras
Name | Type | Description |
---|---|---|
SEARCHTYPE | Drop-down | Choose whether the search will return event or service articles. this option will only be present if you have the Service template installed |
ITEMSPERPAGE | Number | The number of items per page displayed in the search results |
KEYWORD | Drop-down | Whether or not the keyword search box will be displayed |
BROWSEMODE | Drop-down | Whether the template will operate in browse mode before a search is performed |
ACTIVEONLY | Drop-down | If "yes" only future events with availability are returned |
ROOTARTICLES | Asset Lookup | Picks the root articles for the content that will be searched |
NUMPREFILTERS | Drop-down | The number of pre-filters to display |
NUMPOSTFILTERS | Drop-down | The number of post-filters to display |
PREFILTERLABEL[1,2,3] | Text | The label of the filter |
PREFILTERTYPE[1,2,3] | Drop-down | The type of filter (either metadata, date or location) |
PREFILTERALLOPTION[1,2,3] | Text | Overrides the default "All" text. Metadata pre-filters only |
PREMETAOPRIONS[1,2,3] | Asset Lookup | The metadata values for the filter |
PREDATEOPTIONS[1,2,3] | Checkbox Group | The date options |
PRELOCATIONOPTIONS[1,2,3] | Asset Lookup | Pick the location articles to use as a filter |
POSTFILTERLABEL[1,2,3] | Text | The label of the filter |
POSTFILTERTYPE[1,2,3] | Drop-down | The type of filter (either metadata or location) |
POSTMETAOPTIONS[1,2,3] | Asset Lookup | The metadata values for the filter |
POSTLOCATIONCONFIG[1,2,3] | - | Guidance text |