Spuds embedded into your web pages act like windows. What you see through these windows is your event information on the Trumba servers. The exact view depends upon the specific spud that you’re using.
Because spuds are windows into your hosted data, changes you make in the Trumba Connect editing environment show up immediately on your site.
Adding a Trumba Calendar
- In your Trumba account, display the calendar you published and click Publish to display the Publishing Control Panel. If you haven't published your calendar yet, go through the publishing settings, and clickOK. The Publishing Control Panel appears after you publish the calendar. More information about the publishing settings…
- In an HTML or text editor, open the web page into which you want to embed the spud so that you can edit the code.
- Back in the Publishing Control Panel for your Trumba calendar, click in the code for the spud you want to embed to select it. Copy the code and paste it into your webpage's HTML code where you want the spud to appear.
To embed spuds in a page, you need two sections of code:
- One time per page, just before the first spud on the page, you need to paste the script that controls communication among spuds on the page and between spuds and your source calendar data:
Note Although you should use this script only once, it appears with all spuds, because all of the spuds could be the only spud on your page. For the second or subsequent spuds on a page, do not copy this part of the code from the Publishing Control Panel.
- The code for the spud itself. Here's the default code:
4. (Optional but recommended) If you embed a promotion spud that includes theteaserBase argument, such as an Upcoming Events list or crawler, replace the URL to your hosted calendar page with the URL of the web page in which you embedded your main calendar spud. That way, when visitors click an event in the promotion spud, they are directed to the main calendar on your website instead of being directed off of your site to your hosted calendar on the Trumba Connect site.
The $Trumba.addSpud method then looks like this:
5. Save and close your web page file, and then view the page in the web browser to see your embedded calendar spud.
If the calendar spud doesn't display the way you want it, see the helpful links below.
Helpful Trumba Links