What you can learn in this topic
Using built-in event fields and custom fields you create, you can provide filter spuds along with your published calendar. When you provide filtering, you give visitors a way to narrow events to only the ones they currently care about.
For example, visitors to a martial arts studio website might want to limit events to those taught by a specific instructor. Or, they might want to see only beginner-level classes that are open to all age groups. Filters make these options possible.
You create filters by configuring filter spuds. To add the filters to your website, you embed the filter spuds into the same web page where you embedded your published calendar.
Before you can configure filter spuds, you must set up custom fields on which you want to filter.
For example, if the museum wants its site visitors to filter events by category, the museum must:
For each published calendar, you can set up a maximum of five filters across all of the filter control spuds and filter views you want to use.
Tip Filter views provide a way to pre-filter calendar views, promotion spud content, and event feeds based on a combination of custom field values or owning calendars. See Filter views.
You can set up:
When you set up filters that act independently, all of the filters are visible at all times. Site visitors can use one filter at a time to limit events they see in the calendar. Or, they can combine two or three filters to limit the events list even further.
Tip You can configure one filter spud to support up to three independent filters.
When one filter is dependent upon another:
In one filter spud, you can configure up to five filter levels. If the second filter is dependent upon the first filter, then the third filter will be dependent upon the second.
For example, suppose a martial arts studio created two filters, Level (Beginner, Advanced, etc.) and Age Range, and made Age Range dependent upon Level.
The table below contains more examples that show how the two dependent filters work together.
To see these events | Level filter selection | Age Range filter selection |
---|---|---|
Beginner classes appropriate for all ages | Beginner | All Ages |
Advanced classes appropriate for all ages | Advanced | Only Adults appears. There are no advanced events for all ages. |
All events in the calendar | [All Values] | This filter disappears |
You can't mix dependent and independent filters within the same filter spud. Either all of the filters depend upon each other or they are all independent. To set up a combination of dependent and independent filters, therefore, you create multiple filter spuds.
Note You can set up a maximum of five filter levels, whether you configure all five in the same spud or some in one spud and some in another.
For example, suppose the martial arts studio wants to create two dependent filters for Class Type and Level (Beginner, Advanced, etc.), and an independent filter for Instructor. To do this, the Studio would add:
Site visitors could limit events by choosing values in the dependent filters, the independent filter, or both.
To set up filtering for a published calendar, you add and configure filter spuds. Then, you embed the spuds into the page on your website that contains your published calendar.
Note After you make a calendar-level change, such as mixing in a new calendar or adding or removing a filter, it takes approximately five minutes for the changes to appear on your website.
Note The following steps assume that you already published your calendar.
In addition, make sure that you have added events to your calendar that use the custom fields you're filtering by.
Notes
If you don't see a field on which you want to filter, you may need to add the field to the event template you're using.
For example, the library labeled its audience field filter Audience. The museum labeled its category field filter Search by Categories.
For example, a library might offer site visitors the option of filtering events by one audience type at a time.
For example, a college might offer students signing up for campus tours the opportunity to select more than one tour type.
Note When filtering on a field with multiple values, you can adjust the size of the check boxes. To do so, on the Edit Settings for Filter page, go to the Styles tab, then under the Drop-down Items section, adjust the Dropdown font size.
If you want the second or third filter to appear only when a value is selected in the previous filter (that is, to be dependent), select Display filters only after a selection is made in the previous filter.
With Yes selected, you can create one filter spud version for use in all environments. Multi-select filters automatically convert to space-saving single-select filters when your webpage is viewed on a mobile phone or tablet.
If you set up global styles, those settings are reflected on the Styles tab and you won't have to start from scratch.
When you publish a calendar, you have the option of adding and configuring filter spuds that you can embed into your website on the same page as the calendar. To embed a spud, you copy and paste the JavaScript code and paste it into the code for the page where you want the spud to appear.
To embed filters into your website
You can reconfigure a filter spud to remove or modify some or all of its filters.
To turn off filtering altogether, you can remove filter spuds from the Control Spuds tab in the Publishing Control Panel. If you turn off filtering, remember to remove the filter spud code from your website.
To reconfigure a filter spud
To turn off filtering