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

URL parameters for setting the default mix-in state

When you publish a Trumba® calendar with other calendars mixed into it, by default, all of the calendars are displayed (mixed in) when you view the calendar. This is true whether you embedded the calendar spud into your website or you view it on the Trumba Connect hosted site.

You can use the mixin= or mixout= parameter to:

  • Change the default view of your spud.
  • Provide links that display your spuds in a particular mix-in state.

Parameters

  • mixin=calendar_id1%2ccalendar_id2%2c…
  • mixout=calendar_id1%2ccalendar_id2%2c…

    where calendar_idn is a calendar's unique id number, and %2c is an URL-encoded comma.

Values

The value of calendar_idnumber is unique for each calendar.

Note The parameter for setting the mix-in state was formerly (until May 2007) mix=. This parameter will eventually be phased out. If you do use it anywhere, please replace it with mixin= or mixout= as soon as you can.

The values for the mix= parameter were calculated based on the combination of calendars that were displayed. The value (and any URLs using it) became invalid if you added or removed a calendar in your publication. Calendar id numbers do not change, and so your links will not become invalid if you change the structure of your publication. In addition, you can use the same calendar id values in any URL you create.

Change the default mix-in state

To set a new default mix-in state, you:

  • Find the value that sets the mix-ins to the state you want.
  • Plug that value into an URL or into the spud code for your main calendar and mix-in spuds.

To find the value for the mix-in state you want

  1. View your calendar on your site or on the Trumba Connect hosted page (http://www.trumba.com/calendars/yourcalendarname).
  2. Use the mix-in spud to set the mix-in state you want.
  3. In Firefox, right-click the main calendar spud and choose This Frame > View Frame Source.

    In Internet Explorer, right-click the spud and choose View Source.

  4. In the source code, there's a variable toward the top of the page that shows you the URL for the spud. It looks something like this:

    var trumba_baseUrl = '/calendars/calendarname?
    mixout=99555%2c162533&calendar=calendarname';

    In this example, the mix-in state is determined by the mixout parameter. The value of the parameter here shows the calendar ids for two calendars that are not mixed into the current view. The calendar ids are separated by an URL-encoded comma (%2c)

    This URL could also show the mixin parameter and include the ids of the calendars that are mixed into the view.

    Generally, Trumba Connect uses the parameter that would require the smaller number of calendar ids. That is, if you hide fewer calendars than you display, Trumba Connect uses the mixout= parameter; if you display fewer calendars than you hide, Trumba Connect uses the mixin= parameter.

To plug the value into an URL or into the spud code for your main calendar and mix-in spuds

  1. In an HTML or text editor, open the page in which you want to change the default mix-in view for spuds or provide a link to the new view.
  2. If you want to show spuds with the new default, find the spud code for the main calendar, and add the url argument to it, with the mixin or mixout parameter and value that you found in the source code, as described in the procedure above.

    Using the example from the procedure above:

    • The main calendar spud code looks like this:
      <script type="text/javascript">
      $Trumba.addSpud({
        webName: "calendarname",
        spudType : "main",
        url: {mixout: "99555,162533"}
      });
      </script>

      Note Spud code is not URL-encoded, so you type the comma normally.

    • The URL you use to provide a link to the new mix-in state looks like this (where the blue text is where your site's URL, calendar page, and calendar name would be):

      http://www.yoursite.com/calendar.html?trumbaEmbed=calendar%3Dyourcalendarname%26mixout%3D99555%2c162533

  3. If you're changing spud code, add the same url argument to your mix-in spud's code, so that it correctly reflects the state of the main calendar.

Return to URL parameter list

Privacy | Terms | Public Calendars