// This script MUST remain dynamic since this data and the included data is modified with a URL parameters request.element.isStatic = 0; request.element.hasData = 1; // Get the Configuration and Page Map Values appConfig = application.ptCalendar.getAppConfig(); cfDateDisplayMask = application.ptCalendar.getDisplayCFdateMask(); // "M/D/YYYY" - DATE FORMAT FOR DISPLAY cfDateLongDisplayMask = application.ptCalendar.getDisplayCFdateLongMask(); // "dddd mmmm d, yyyy" - DATE FORMAT FOR DISPLAY cfTimeDisplayMask = application.ptCalendar.getDisplayCFtimeMask(); // "h:mm tt" - TIME FORMAT FOR DISPLAY cfDateSortMask = application.ptCalendar.getSortingCFdateMask(); detailPageURL = application.ptCalendar.csData.parseCSURL(str=57556); //TODO: how do we sent this value // Set the Event Cache status from the configuration element useEventsCache = false; linkParamsData = StructNew(); eventDetailLink = ''; // Get the items from the Display Properties Custom Element items = attributes.elementInfo.elementData.propertyValues; eventData = StructNew(); eventArr = ArrayNew(1); eventQry = QueryNew('temp'); itemData = StructNew(); if ( ArrayLen(items) AND StructKeyExists(items[1],"values") ) itemData = items[1].values; //application.ptCalendar.utils.doDump(items,"items",0); //application.ptCalendar.utils.doDump(itemData,"itemData",0); if ( StructKeyExists(itemData,"uniqueID") ) { eventQry = application.ptCalendar.calEventsDAO.getEvents(eventID=itemData.uniqueID,useCache=useEventsCache); //application.ptCalendar.utils.doDump(eventQry,"eventQry",0); // Convert the Event Query data to and Array of Structs if ( eventQry.RecordCount ) eventArr = application.ptCalendar.data.queryToArrayOfStructures(queryData=eventQry); //application.ptCalendar.utils.doDump(eventArr,"eventArr",0); qParamDelimiter = "?"; // Get the view link data structure if ( application.ptCalendar.viewPageMode EQ "Single" ) { viewLinkData = application.ptCalendar.calRenderViewService.getCalViewPageStruct(); qParamDelimiter = "&"; } else viewLinkData = application.ptCalendar.calPageMapDAO.getCalPageMapStruct(); if ( structKeyExists(viewLinkData, "detailPage") and len(trim(viewLinkData.detailPage)) ) detailLink = viewLinkData.detailPage; //application.ptCalendar.utils.doDump(detailLink,"detailLink",1); detailLink = detailPageURL & "?" & ListRest(detailLink,"?"); //application.ptCalendar.utils.doDump(detailLink,"detailLink",1); }
Select the specific Date/Time for the Event selected:

#eventArr[1].title#

    eventData = eventArr[itm]; linkParamsData = application.ptCalendar.calRenderService.buildEventDetailsLinksParams(eventDataStruct=eventData); eventDetailLink = application.ptCalendar.calRenderService.buildLinkParamURL( linkURL=detailLink ,linkParamName=linkParamsData.UIDvarName ,linkParamValue=linkParamsData.UIDvalue ,urlParams="" ); #dateFormat(eventData.eventDate, cfDateLongDisplayMask)#  [R*]  [R] [ALL DAY] #timeFormat(eventData.startTime, cfTimeDisplayMask)# - #timeFormat(eventData.endTime, cfTimeDisplayMask)#
  • #dateStr# - #timeStr#
eventData = eventArr[1]; linkParamsData = application.ptCalendar.calRenderService.buildEventDetailsLinksParams(eventDataStruct=eventData); eventDetailLink = application.ptCalendar.calRenderService.buildLinkParamURL( linkURL=detailLink ,linkParamName=linkParamsData.UIDvarName ,linkParamValue=linkParamsData.UIDvalue ,urlParams="" ); doRedirect = true; // Pass ?redirect=0 to disable redirect if ( StructKeyExists(request.params,"redirect") AND IsBoolean(request.params.redirect) ) doRedirect = request.params.redirect; csmode = ""; if ( StructKeyExists(request,"renderstate") AND StructKeyExists(request.renderstate,"rendermode") ) csmode = request.renderstate.rendermode; if ( LEN(TRIM(eventDetailLink)) ) redirectURL = eventDetailLink; if ( !doRedirect ) { WriteOutput('

The redirect to "#redirectURL#" has been temporarily disabled via the "redirect" URL param!

'); exit; } if ( application.ADF.csData.isTemplate(csPageID=request.page.id) ) { WriteOutput('

The redirect has been disabled while on the Page Template!

'); WriteOutput('

Redirect URL: #redirectURL#

'); exit; } else if ( csmode IS "edit" OR csmode IS "author" ) { WriteOutput('

The redirect to "#redirectURL#" has been temporarily disabled while in Edit/Author mode!

'); exit; } else if ( LEN(TRIM(redirectURL)) EQ 0 ) { WriteOutput('

No redirect URL was provided.

'); exit; }