Filter parameters are optional parameters that can be:
url
argument in the $Trumba.addSpud() method.trumbaEmbed
parameter in a URL-encoded query string.filter1
, filter2
, filter3
, filter4
, and filter5
. You can use one filter parameter at a time or use any number (up to five) of filter parameters together.For details about how to find the assigned fields and the order in which you assigned them, see Constructing filter URL parameters.
Filters the events you see by specific field values from the filter spuds you configured.
Tip If you haven't assigned the fields and field values you're filtering by to any events on your published calendar, you'll get zero results.
The values that filter parameters take are the field values for which a filter spud is configured. In some cases the field values are represented by text and in other cases the field values are represented by numbers.
For example, an Alumni Chapter filter's field values might be represented by text such as Washington, California, and New York.
An Audience filter's field values might be represented by numbers similar to 274766 and 274767.
For details about how to find the words and numbers that represent field values, see Constructing filter URL parameters.
Constructing a filter parameter is a three-step process:
url
argument in spud code and/or to a URL-encoded query string.To see a list of the fields assigned to filter spuds and views and the order in which you assigned them:
To find the word or number that represents a field value:
If you haven't published your calendar yet, in the Publishing Control Panel, on the Publish Settings tab, click Preview all Spuds.
The way you do this differs by browser. For example:
Tip
http://www.trumba.com/calendars/calendar.1005492.rss?filter1=_California_Washington_&filterfield2=30476
http://www.trumba.com/calendars/calendar.1008652.rss?filter2=_428302_428303_&filterfield2=30476
Use the examples that follow for specific guidance on adding filter parameters to url
arguments in spud code and URL-encoded query strings.
The examples illustrate these guidelines:
For example, WI_Midwest becomes _WI._Midwest_
.
For example, Under $10.00 becomes _Under%20%2410..00_
. (%24 is the URL-encoded dollar sign ($).)
Tip In calendar feed URLs, it's not necessary to wrap entire field value strings in underscores or to encode periods. However, you must put underscores between field values and period-encode underscores. See the Calendar feed URL section below for specific examples.
url
argument, $Trumba.addSpud() method, Main calendar spudExample 1 Limits the events that display in the main calendar spud to those with the Audience field values of Adults (field value 274766) or Educators (field value 274767).
Example 2 Limits the events that display in the main calendar spud to those with the Pricing field values of Very_Expensive or Under $10.00.
Tip The entire filter parameter field values string must always be wrapped with underscores. In the url
argument, it's not necessary to encode space characters, periods, or dollar signs. However, you must encode underscores internal to field values with periods (.).
Example 1 In the spuds embedded at the base URL, limits the events that display to those with the Alumni Chapter field values of Washington or California.
http://www.yoursite.com/calendar.html?trumbaEmbed=filter1%3D_Washington_California_
Example 2 In the spuds embedded at the base URL, limits the events that display to those with the Pricing field values of "Very_Expensive" or "Under $10.00".
http://www.yoursite.com/calendar.html?trumbaEmbed=filter2%3D_Very._Expensive_Under%20%2410..00_
Tips
In the RSS feed at the base URL, limits the events that display to those with the field values of "Under $10.00" or "Very_Expensive".
http://www.trumba.com/calendars/calendarwebname.rss?filter1=Under $10.00_Very._Expensive
In the RSS feed at the base URL, limits the events that display to those with the filter field values of "510698" or "510699".
http://www.trumba.com/calendars/calendarwebname.rss?filter1=510698_510699
Tips
trumbaEmbed=
and do not URL-encode parameters.