Jump to content

Publish different calendar views on different pages


Recommended Posts

You can publish different views of the same calendar on different pages of your website. All you have to do is embed, on each page where you want a new view, a slightly modified version of the main calendar spud code.

 

To modify the code, add a url argument that uses a template parameter to specify the view.

 

<script type="text/javascript" src="//www.trumba.com/scripts/spuds.js"></script>
<script type="text/javascript">
$Trumba.addSpud({
webName: "name",
url: {template: "viewname" },
spudType: "main"});
</script>

Where it says "name", your calendar's unique web name for the published calendar appears.

You can find the template parameter's "viewname" values here. For example, if you want to publish a calendar using the 3 Columns view, replace "viewname" with "3columns".

To customize the main spud code and publish an alternate view

  1. In the Publishing Control Panel, on the Calendar Spuds tab, under Main Calendar Spud, copy the main calendar spud script code.
  2. Paste the code into a webpage where you want to publish the calendar with a different view.
  3. Modify the code you just pasted by adding a URL argument (as shown in the example above). For "view name," provide the name of the calendar view template name you want to use.
  4. Preview the page to make sure the code works and that you see the intended view.
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...