The Event Search template provides a range of filter, date and keyword options that can be used to search for events. Once the search results return, further filters can be applied, such as location and event category. Results can also be viewed on a map.
Search Mode
If your website has the Service template installed a drop-down will appear at the top of the article extras. You can choose whether or not the search should return services or events (it cannot return both). The services search is described in the Service Directory Search documentation.
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 event search control appears beneath the standard page content. The control can be configured to display up to four pre-search filters. The filters and keyword can be used in any combination.
For example, if you select a category, but do not set a date range or enter a keyword, all events in the category will be returned.
If you select a date range but no category or keyword, all events within the date range will be returned.
If you enter a keyword and select a date range and include a category, only events that contain the keyword and match the category and date range will be returned.
Category
The category filter displays a drop-down of possible categories. Events are assigned a category by tagging them with metadata values.
Dates
The date filter displays a drop-down of possible dates ranges. The values in this drop-down are content managed and can be selected from "All dates", "Today", "Tomorrow", "The weekend", "Next 7 days", or "Choose a date range". The date range option reveals "From" and "To" input fields which can be used to define a date range.
Locations
This filter will display events hosted at the chosen location. Locations are articles in iCM that use the Location template. In the Event Search article extras you can pick with locations appear in the drop-down.
Keyword
When used without filters the keyword search performs a search for events in all categories, occurring on future dates.
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.
Event Search Results
Search results for events 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" upcoming events (the soonest first) are displayed before a search is performed. If browse mode is disabled no results are displayed until a search is performed.
You can also use the article extras to control whether past events, or events that are fully booked, are returned. "Only show active results" set as "Yes" will only show future events with available places.
Search Summary
Once a search has been performed the following text will be displayed below the search control.
Showing results for <keywords> in <filter> between <start date> and <end date>
Where:
<keywords> = the keyword(s) used for the search
<filter> = the category selected
<start date> = the first date of the date range (or first date of the weekend, or today if "next 7 days")
<end date> = the last date of the date range (or final date of the weekend, or seven days time)
View as a List
Each result displays information about one event. Events display their heading, which acts as a link to the event, introductory text and image (if present). The next three occurrences of the event are listed using the standard list described in Event List Format.
If an event has more than three scheduled occurrences a "View all" button appears beneath the grid of three occurrences. The view all link takes the user to the full event article.
Sort Control
Once you have performed a search, the list of results can be sorted by date or by relevance. Selecting "Date" will sort the list in date order, with the next occurrences appearing first. Selecting "Relevance" will sort the results with the most relevant at the top of the list.
View on a Map
The map view displays the search results plotted on a map. Each map pin represents a location at which events returned by the search are taking place.
Clicking on a map pin displays a pop-up which includes a summary of the events taking place there.
The event items in this pop-up display as they do in the list result view.
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 event location.Category Filters
Events are assigned a category by tagging them with metadata values.
Configured filters are only displayed if the search results include events 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 events 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 event 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 events 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 date ranges. Up to four filters of the three types can be included.
Date Filter
The date filter allows a user to restrict their search to a certain date range. Enter a name for your filter in the filter label box. If no label is entered, none will appear. The label will appear above the date drop-down. Use the checkboxes to select which date options will appear in the drop-down. Although possible, there is no point in creating more than one date filter type.
Metadata Filter
When events are created they can be tagged with metadata values. These values are generally used to categorise events. The metadata type filter allows a user to restrict their search to a certain category (metadata value) of event.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 events 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 events.
We recommend setting up dedicated event 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.
Should a user not select an option from the metadata filter, a search on all metadata items will be performed. 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 events returned. Note that even if there are no events 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.
Custom Styling
The article extras include a "Search result styling metadata" field.
In a similar way that you can add custom CSS modifiers to articles, this metadata lets you style results that appear in the Event Search.
Pick one or more metadata properties in the article extras. Next, relate values from those properties to event articles. When those articles appear in the search results, they will have additional CSS classes added to them, which can be targeted by your site skin. Classes have the format
For example, this article using the Event template has values from the "culture" metadata property related to it:
The "culture" property has been selected in the Event Search article extras as a property that also provides styling (see the first screenshot above).
When events that have values from the "culture" property appear in the search results, the containing div has the following additional CSS classes:
<div class="event-results__item event-results__item event-results__item--theatre event-results__item--poetry">
These can then be styled in your site skin.css file:
.event-results__item--theatre {
border: 1px solid #f00;
}
Note that these extra classes will only appear in the results of the Event Search template. They won't be output on the event article, or the standard site search (or on another event search article that doesn't have the property selected in its article extras).
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 |
EVENTSTYLINGMETADATA | Metadata property | Pick the metadata property/properties whose values will be recognised and added to searcg results as CSS modifiers that can be targetted by your site's skin |
PREFILTERLABEL[1,2,3,4] | Text | The label of the filter |
PREFILTERTYPE[1,2,3,4] | Drop-down | The type of filter (either metadata, date or location) |
PREFILTERALLOPTION[1,2,3,4] | Text | Overrides the default "All" text. Metadata pre-filters only |
PREMETAOPRIONS[1,2,3,4] | Asset Lookup | The metadata values for the filter |
PREDATEOPTIONS[1,2,3,4] | Checkbox Group | The date options |
PRELOCATIONOPTIONS[1,2,3,4] | 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 |