Trumba Web Calendar Software
Google 
Trumba Help Center What’s New | FAQ | Support Forum | Email Support

Publish customized views using filter views

What you can learn in this topic

When you should use filter views

Filter views provide a way to pre-filter spud and feed content by a combination of custom field values, owning calendars or custom object owning folders. In order to use filter views you must be using at least one custom field or have your content organized into multiple calendars/folders.

Learn about creating custom fields.

The following is a list of the primary use cases for filter views:

  • Publish subsets of content in different sections of your website,
    all with a similar look and feel.
  • Link to pre-filtered views of content.
  • Publish subsets of content in promotion spuds.

How do filter views relate to filter spuds

Filter spuds are control spuds that you can include on your published view to allow site visitors to make filter selections. Filter views are a way for you to pre-define specific filter values that can be applied to these views.

When a specific field is included in both your filter view and a filter spud, the filter spud will have the filter view filtered applied by default but the visitor may change the filter using the filter spud.

Tell me more about filter spuds

The process for creating filter views

Filter views are defined within a publication and can be applied to spuds and feeds in that publication.

A filter view consists of the following:

  • Name: You assign each filter view a unique name to identify the filter view within a publication. Once you use a filter view on your web site, it is important that you do not change the name of the view.
  • Filters: You must specify at least one filter including the field (or calendar/folder) and the value or values to filter on. You can specify a total of 3 filters per filter view.
  • Search Info Panel Visibility: You also specify whether the custom fields in your filter view should be shown in the Search Info Panel, the area at the top of the main spud (orange area in sample below) that shows the currently applied filters. Typically, you display custom fields in this section only when the main view is accompanied by a filter spud that visitors use to filter content by fields.

To create a filter view

  1. In your Trumba account, select your publication.
  2. Click the Publish button.
  3. First, you must enable filter views on your publication.
    Select the Publish Settings tab and select the Edit Publish Settings button.
    Set the Enable filter views setting to Yes and select OK.
  4. At the top of the Publish Control Panel, select the [create new view] option from the filter view drop down.
  5. On the New Filter View page, enter a name, specify filters and whether custom field filter values should be shown in the search info panel.
  6. Click OK.

How to use filter views in your website

There are two ways you can use filter views on your web site.

  1. Embed spud script that includes a filterview parameter.
  2. Link to filter views using the trumbaEmbed URL argument.

Embed spud script that includes a filterview parameter

This method is appropriate if you plan to use a separate web page on your site to display each filter view. Each page will have it's own custom spud script that specifies the filter view name in the filterview parameter.

When you select a filter view in the Publishing Control Panel, the scripts for all spuds are updated to include the filterview parameter as illustrated below.

<script type="text/javascript">
$Trumba.addSpud({
webName: "my-calendar",
spudType : "main" ,
url : { filterview : "myview" } });
</script>

Note When using the filterview parameter with your main spud, be sure that the filter view is selected before copying the control spud scripts for your page. This will ensure that the filterview parameter is included on all your spuds.

Learn more about customizing spud code.

Link to filter views using trumbaEmbed URL argument

This method is appropriate if you plan to use a single web page on your site to display your filter views. Instead of specifying the filter view as part of your spud script, you include the filterview parameter in the trumbaEmbed argument when linking to your main page.

http://www.trumba.com/calendars/concerts?trumbaEmbed=filterview%3dmyview

Tip The Hosted View tab in the Publish Control Panel displays a link that includes the trumbaEmbed argument for the currently selected filter view.

Learn more about using trumbaEmbed to specify URL parameters.

Privacy | Terms | Public Calendars