|
|
|
||||||||||||||||||
| Trumba Help Center | FAQ | Support Forum | Email Support | ||||||||||||||||||
Search and filter URL parameters
The To use the search and filter parameters, you append them as query strings to a Parameter
Searches the event description and notes fields for a word or phrase. ValuesEnter a single word, exact phrase, or list of words that you want matched. If you enter a multi-word phrase, you need to URL-encode the space character (%20). If you want to enter multiple words by which to search, use an underscore as a delimiter between words. Examples
List popular search terms that link to the search resultsYou might want to provide visitors with a list of popular search terms, in which each term links to a view of the corresponding search results. For example, if you run a site that lists art events and want to link to a view that displays events with the word "sculpture" in them, here's the URL you'd use:
Note If you want to use a multi-word phrase in a search or filter parameter, you also URL-encode the space character (%20). To create the same view using spud code:
<script type="text/javascript">
$Trumba.addSpud({ webName: "calendarname", spudType : "main", url: {search: "sculpture"} }); </script> Tell me more about how search works. Parameter
If you've configured one or more filter spuds, you can provide filtered views through the URL. You can set up a maximum of three filters Value
After you configure your filter spuds, consult the Publish Settings tab in the Publishing Control Panel to see which filters correspond to each filter parameter. In URLs, filter parameter values must be URL encoded:
Examples
The table below shows how to use the parameters with two common filters that you can set up. It uses the Trumba Connect hosted page as the location of the calendar, and it shows the query strings that you would append to your base URL and In other words, to create the URL, you append a query string example from the table to:
When using the filter parameter for an Event Type filter, you need to find the correct numeric value for the event type (similar to the way you find the calendar ID for mixin/mixout parameters). To find the numeric value, go to your calendar page, set the filtered view you want, look up the base URL in the source code to get the numeric value, and use that value in the filter parameter. For example, suppose you want to filter for events of type Deadlines, and the numeric value for Deadlines is 4307. If the calendar web name is event-calendar and your event type filter is the first one (filter1), the URL you would create to display the calendar filtered to show events of type Deadlines would look like this: http://www.yoursite.com/yourcalendarpage.html?trumbaEmbed=calendar%3Devent-calendar%26filter1%3D4307
Note Currently Event Type is the only filter that needs the numeric value. If you filter on Location or another custom field, you enter the value you entered when you defined the field. For example, if filter1 is Location, Using the arts events example from the search section above, if you have a filter for the event type, and you want to display a calendar view with both the Deadlines and Visual Art event types (numeric value 4412), you'd use this URL:
In the URL filter1 is the parameter for the first filter you set up. The filter parameter can take multiple values, and you use the underscore as the delemeter before and after each value (so you see two underscores between the two values). To create the same view using spud code:
<script type="text/javascript">
$Trumba.addSpud({ webName: "calendarname", spudType : "main", url: {filter1: 4307, filter2: 4412} }); </script> Encoding underscores and periods in filter valuesTo use a filter value that contains an underscore or a period, such as a Region defined as WI_Midwest, or a Price defined as Under $10.00, you encode the two characters by preceding them with a period.
|
|||||||||||||||||||
| Privacy | Terms | Public Calendars | |||||||||||||||||||
| © 2004–2008 Trumba Corporation. All rights reserved. Click for trademark information. | |||||||||||||||||||