Toggle menu

Event Search

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.

Event Search Template
 

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

The list view 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

Map Results
 

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

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

  1. Page size - The number of results to show per page
  2. Enable keyword search - Whether or not the keyword search box appears
  3. 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
  4. 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
  5. Number of pre-filters - 0-3 pre-filters can be configured
  6. 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

Event Metadata
 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:

  1. There is no "All" option as the search has already been performed
  2. 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.

Event Styling Extras
 

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 event-results__item--<value> (where <value> is the related metadata value).

For example, this article using the Event template has values from the "culture" metadata property related to it:

Related Metadata
 

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 

NameTypeDescription
SEARCHTYPEDrop-downChoose whether the search will return event or service articles. this option will only be present if you have the Service template installed
ITEMSPERPAGENumberThe number of items per page displayed in the search results
KEYWORDDrop-downWhether or not the keyword search box will be displayed
BROWSEMODEDrop-downWhether the template will operate in browse mode before a search is performed
ACTIVEONLYDrop-downIf "yes" only future events with availability are returned
ROOTARTICLESAsset LookupPicks the root articles for the content that will be searched
NUMPREFILTERSDrop-downThe number of pre-filters to display
NUMPOSTFILTERSDrop-downThe number of post-filters to display
EVENTSTYLINGMETADATAMetadata propertyPick 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]TextThe label of the filter
PREFILTERTYPE[1,2,3,4]Drop-downThe type of filter (either metadata, date or location)
PREFILTERALLOPTION[1,2,3,4]TextOverrides the default "All" text. Metadata pre-filters only
PREMETAOPRIONS[1,2,3,4]Asset LookupThe metadata values for the filter
PREDATEOPTIONS[1,2,3,4]Checkbox GroupThe date options
PRELOCATIONOPTIONS[1,2,3,4]Asset LookupPick the location articles to use as a filter
POSTFILTERLABEL[1,2,3]TextThe label of the filter
POSTFILTERTYPE[1,2,3]Drop-downThe type of filter (either metadata or location)
POSTMETAOPTIONS[1,2,3]Asset LookupThe metadata values for the filter
POSTLOCATIONCONFIG[1,2,3]-Guidance text
Last modified on June 10, 2024

Share this page

Facebook icon Twitter icon email icon

Print

print icon