need help with velocity and cascade fullcalendar
I need to output the contact name from an event Below is my code, I need to know how to reference the contact name field and use that as the speaker name.
#macro (outputEvent $eventId, $start,$panel_ID)
#set ($eventSDS = $eventDataHash.get($eventId))
#set ($startDate = $start)
#set ($link = $eventSDS.get("link"))
#if ($eventSDS.get("title"))
#set ($title = $eventSDS.get("title"))
#else
#set ($title = $eventSDS.get("name"))
#end
#set ($summary = "")
#set ( $summary = $_EscapeTool.xml($eventSDS.get("summary")) )
#set ($location = "")
#set ( $location = $_EscapeTool.xml($eventSDS.get("location")) )
#set ($contact_name = "")
#set ($titleText = $_EscapeTool.xml($title))
#if ($_DateTool.format("m", $startDate) == 0)
#set ($display_time = $_DateTool.format("h:00 a", $startDate))
#else
#set ($display_time = $_DateTool.format("h:m a", $startDate))
#end
#if ($_DateTool.format("m", $endDate) == 0)
#set ($display_endtime = $_DateTool.format("h:00 a", $endDate))
#else
#set ($display_endtime = $_DateTool.format("h:m a", $endDate))
#end
<div class="panel">
<div data-toggle="collapse" data-target="#collapse${eventId}" data-parent="#accordion" class="panel-heading">
<strong class="panel-title"><a style="font-weight:600; color:#695E49;" href="#">${display_time} ${titleText} </a><br />
Speaker: ${contact_name} </strong></div>
<div id='collapse${eventId}' class="panel-collapse collapse">
<strong class="panel-title">
<div class="panel-body">
#* <strong>Where:</strong> <br /> *#
<strong>When:</strong> ${display_time} - ${display_endtime}<br />
<strong>Description:</strong> ${summary} <br /> <a target="calendar_frame" href="${link}">More Details</a>
</div>
</strong>
</div>
</div>
#end
Discussions are closed to public comments.
If you need help with Cascade CMS please
start a new discussion.
Keyboard shortcuts
Generic
? | Show this help |
---|---|
ESC | Blurs the current field |
Comment Form
r | Focus the comment reply box |
---|---|
^ + ↩ | Submit the comment |
You can use Command ⌘
instead of Control ^
on Mac
1 Posted by Ryan Griffith on Jul 28, 2014 @ 02:45 PM
Hi Eric,
It looks as though you are almost there, but need to adjust the way you are setting the
$contact_name
variable.I am assuming you are customizing the events landing listing Format, so this will require two updates:
outputEvents
macro:outputEvent
macro that sets the variable:Note: I made some assumptions on how your event Data Definition is set up, so you may need to adjust the way the contact_name field is obtained in the
outputEvents
macro.Please let me know if you have any questions.
Thanks!
Ryan Griffith closed this discussion on Aug 04, 2014 @ 12:44 PM.