PT Calendar2 Calendar Template
From ADF Docs
Back to Build Subsites, Templates and Pages
Overview
The Calendar template will be used as the foundation to render calendar pages. This template will be used for the "All Event" Monthly Calendar View.
Steps
- Create a CommonSpot page called 'Calendar' from the Base Plus One template. (The subsite for this is not critical but it may be a good idea to create a subsite called calendar.)
- In a container element in the body of the page, add a Custom Script element.
- From the Custom Script element interface, click the Edit icon.
- Enter the following text into the Explicit Module path:
- /ADF/apps/pt_calendar2/customcf/calendar_standard_setup.cfm
- Next add the Calendar2 Custom Element on this page.
- Click Render Mode in the element interface.
- Select Display existing element data (content reuse) on the Rendering Mode tab.
- Select the Filter tab.
- Select Filter Type to Show subset of records.
- Select the Field drop-down as the date field.
- Select the operator as Greater Than or Equals.
- Click the '...' button to open the ColdFusion expression window.
- Enter the the following text as the expression:
- application.ptCalendar2.Date.firstOfMonth(request.ptcalendar2.thisMonth, request.ptcalendar2.thisYear)
- Uncheck the force cache checkbox.
- Click OK and then check the box to Ignore ColdFusion error
- Then click OK
- Now use the drop-down under the Date field and choose AND
- In the second Field drop-down that appears select date' again.
- For the second operator select Less Than or Equals.
- For the second value click the '...' button to open the ColdFusion expression window.
- Enter the the following text as the expression:
- application.ptCalendar2.Date.lastOfMonth(request.ptcalendar2.thisMonth, request.ptcalendar2.thisYear)
- Uncheck the force cache checkbox.
- Click OK and then check the box to Ignore ColdFusion error
- Then click OK
- Now use the drop-down under the second Date field and choose AND
- In the Field drop-down that appears select Approved'
- For the third operator select Equals.
- For the third value drop-down select 1.
- For the Sort Order drop-down select the Date field and choose Ascending
- Click OK on the render mode window.
- Submit and activate the page.
- Save the page as a template.
- Submit the template for public use.