Causes a specific spud to be displayed on a webpage.
Also registers the spud with the spud controller, so that the spud can communicate with other spuds on the page and with the database that holds your source calendar data.
Takes one parameter, which is an associative array of arguments, using the JSON (JavaScript Object Notation) syntax. Two arguments are required to display the spud, and others are optional for refining spud behavior.
Returns a spud ID that uniquely identifies the spud and can be used by the getSpudByID method to access a spud object.
Note The $Trumba.addSpud() method and all arguments and parameters that you use with it are case sensitive.
Argument | Type | Description and Values |
---|---|---|
webName (required) | string | The web name of a published calendar you want to embed into your website. For example, webName : "trumbatribune" |
spudType (required) | string | Type of spud you want to embed. For example, spudType : "main" or spudType : "datefinder"
|
teaserBase (optional) | URL | For promotion and some control spuds, specifies the destination page for visitors who click event title, See all..., and other links.
Tip If the events listed in the promotion spud are not owned by or mixed into the main calendar embedded into the teaserBase destination page, clicking an event title link will result in a Sorry, you may not have permission to view that event... error. |
spudConfig (optional) | string | When you create multiple configurations of a control or promotion spud, specifies the name of a specific configuration.
The spudConfig argument is added automatically to the code for each new spud configuration you create. |
spudId (optional) | string | ID of an HTML element, such as a DIV, where you want to place the spud. Use only if you want to place a spud into an element that has already been declared on your page.
Typically, you insert spuds directly into a webpage or into an explicit element location. When you insert spuds in-place, do not pass this argument. The spud is written directly into the webpage using |
url (optional) | object | Associative array of extra parameters. The URL parameters override views and behavior set in the Publishing Control Panel and allow you to display specific spud views on different pages of your website. |
detailBase (optional) | URL | When you want visitors who click an event title in a main calendar or promotion spud to open event detail views on a new page, specifies the new page URL.
Tips
|
history (optional) | boolean | Default is the server setting value.
With Important
|
historyPermalinks (optional) | boolean | Default is the server setting value.
With Important
|
openInNewWindow (optional) | boolean | Use openInNewWindow: true with the detailBase or teaserBase argument to open event details in a new window.
Tip By default, returning to the previous view closes the new window. To force the new window to stay open, use with the |
closeWindowOnReturn (optional) | boolean | Default value is true.
Use |
teaserBase
argumentDisplays the Photo Upcoming promotion spud on the webpage where the code is embedded. The teaserBase argument directs visitors who interact with the spud to a specific calendar page. The spudConfig argument indicates that multiple differently configured versions of the Photo Upcoming spud exist and that this version is embedded on the home page.
Displays the main calendar view on the webpage where the code is embedded. URL parameters set the view to 3 Columns and restrict events to only those containing the search term "sculpture."
detailBase
argumentDisplays the default main calendar view on the webpage where the code is embedded. Event detail views open in new windows, which close when visitors return to the previous view.