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

Use URL parameters to set calendar views

You can use URL parameters to override many of the publishing settings that you choose in the Trumba® editing environment. For example, you can:

In this topic you'll learn:

Syntax for using parameters in URLs

Building an URL to use as a link destination involves building a URL-encoded query string, made up of parameters and values you assign to them. You append this query string to the URL of the page on your site that contains your spud.

To build an URL to use as a link destination

  1. Start with the URL of the page that contains your main calendar spud.

    The rest of this procedure will use http://www.yoursite.com/calendar.html as that URL.

    Tip If you want to create URLs for your hosted calendar page, use the URL http://www.trumba.com/calendars/your calendar name.

  2. At the end of the URL, add a question mark (?), and then the trumbaEmbed= parameter (case sensitive):

    http://www.yoursite.com/calendar.html?trumbaEmbed=

    Note If the default URL for your calendar page already contains a query string (a question mark and one or more parameters), instead of typing another question mark, add URL-encoded Trumba Connect parameters to the existing string as described in the next two steps.

  3. Add URL-encoded parameters that control the spud display, starting with the calendar parameter, which tells Trumba Connect which calendar to use.

    http://www.yoursite.com/calendar.html?trumbaEmbed=calendar%3Dyourcalendarname

    In the URLs above, the question mark (?) delimits the base URL and the query strings. %3D is the URL-encoded equals sign (=).

  4. You add a separate parameter for each action, and to combine parameters, you use an URL-encoded ampersand (%26).

    To add a parameter to the above URL to change the default view to Classic Day, here's what the URL would look like:

    http://www.yoursite.com/calendar.html?trumbaEmbed=calendar%3Dyourcalendarname%26template%3Dday

    And to use it as the destination of a link:

    <a href="http://www.yoursite.com/calendar.aspx?trumbaEmbed=calendar%3Dyourcalendarname%26template%3Dday">Today's Events!</a>

The remaining sections of this topic show more examples of URL-coded parameters.

Notes

  • Case sensitivity Spud code is case sensitive and requires all lower-case for URL parameters. The trumbaEmbed parameter in URLs is also case-sensitive. For other parameters in URLs, to avoid browser anomalies related to case sensitivity, we recommend that you use all lower-case, as the examples in these topics show.
  • URL encoding You might want to find a site that you like that shows you how to URL-encode common characters such as the ampersand, equals sign, space character, and so on. URL Encoding on Blooberry.com is one example of a helpful site. You can find many more by searching the Web for URL encoding.

Syntax for using URL parameters in spud code

In spud code, you use the parameters in the url argument. Each spud supports a set of parameters depending on the spud's purpose. The chart below lists the spuds (or spud types) that support each parameter.

The following code sets the view to Day and changes the color scheme for the main spud:

$Trumba.addSpud(
{ webName: "name",
  spudType: "main",
  url: { template: "day", colorscheme: "5"} });

Tell me more about how to use the spud code.

Supported URL Parameters

The following table lists URL parameters that are available for controlling the view of published spuds and what each one does. Where appropriate in the table, click the parameter name to see its values and how to use it.

Note The parameters are supported in spuds that are appropriate. If you add a parameter to a spud that doesn't support it, the unsupported parameter is simply ignored. For example, the template parameter wouldn't have any effect on a promotion spud, because promotion spuds don't show or control the main calendar view.

ParameterWhat you set with itSpuds/views that support it
calendarSpecifies which published calendar to display.
http://trumba.com/k.aspx?calendar=calendarname
Use only when you create an URL that you use as a link destination. When embedding spuds, use the webName: "calendarname" argument with the $Trumba.addSpud method.
template=The template in which the calendar is displayedMain calendar, view chooser
mixcontrol=Displays or hides the mix-in control that's included with the main calendar spud. (Does not affect the standalone mix-in spud.)Main calendar
date=The date to display in the default calendar view using yyyymmdd formatMain calendar, datefinder, monthlist, upcoming events spuds
index=The event to display first on date specified in date=Main, datefinder, monthlist
filter1= filter2= filter3=The values for the first, second, and/or third filters (when your calendar uses one or more filters)Main calendar, datefinder, monthlist, upcoming events spuds, and filter spuds
search=Display events that contain search termsMain calendar, datefinder, monthlist, search
mixin= or mixout=The default mix-in stateMain calendar, datefinder, monthlist, calendar list, filter, upcoming events spuds
updates=Display or hide markers that appear on the calendar when you make updatesMain calendar
fontscheme=The number corresponding to the font scheme to useMain calendar, datefinder, monthlist, calendar list, filter, search, upcoming events spuds, view chooser
colorscheme=The number corresponding to the color scheme to useMain calendar, datefinder, monthlist, calendar list, filter, search, upcoming events spuds, view chooser
events=Number of events to showUpcoming events spuds
zone=Set the time zone using the index number for the zone you want to viewMain calendar, datefinder, monthlist, upcoming events spuds
view=Whether to display main calendar or event detailsMain calendar
eventid=The event to view when view=eventMain calendar, upcoming events spuds
select=Whether to allow single- or multiple-event selection for taking event actions.Main calendar
Paging and grouping settings How to page, group, and subgroup events, how many events per page, and whether multi-day events appear on all days or just the first day Main calendar
Privacy | Terms | Public Calendars