Event Detail Code Sample

Here is some example code to build an event detail page for the calendar. This is just an example and you have the flexibility to lay out the page to suit your own design.

Below is a screenshot of the layout that this code will build. 

HTML:

Below is the HTML / Branch code that would go in the Template field for the Event Detail content template. 

<h2>{#event.title}</h2>
<div><strong>Date:</strong> {#event.date}</div>
<div><strong>Time:</strong> {#event.time.start} to {#event.time.end}</div>
{if #event.repeats exists}
  <div><strong>Repeats:</strong> {#event.repeats}</div>
{/if}
{if #event.categories exists}
  <div><strong>Categories:</strong>
    {#count|set value="1"}
    {loop items="#event.categories" value="category"}
      {if #count > 1}, {#category.name}{else}{#category.name}{/if}
      {#count|increment value="1"}
    {/loop}
  </div>
{/if}
{if #event.description}
  <div><strong>Description:</strong><br />{#event.description}</div>
{/if}
<form action="{#event.registration.url}">
  <input type="submit" value="Sign me up!" style="padding:10px 15px;font-weight:bold;border:0;font-size:14px;color:#FFF;background-color:#336699;"/>
</form>