| <% code %> |
Evaluate Perl code |
| <%= expression %> |
Print out the value of expression |
| <% CALENDAR NAME %> |
The name of the currently-displayed calendar |
| <% CALENDAR KEY %> |
The key of the currently-displayed calendar (to be used for linking, etc) |
| <% CALENDAR DESCRIPTION %> |
The description of the currently-displayed calendar |
| <% FOREACH GRID ROW %> ... <% /FOREACH %> |
Loops through each available row in the grid of dates, setting the variable $ROW to the row number, beginning with 0 |
| <% FOREACH GRID COLUMN %> ... <% /FOREACH %> |
Used inside of the "FOREACH GRID ROW" tag, this loops through each column available in each row, beginning with 0. It sets the value of the $DAY variable to be a reference to the day in the current Grid Row/Col, and sets the $EVENTS variable to be a reference to that day's events |
| <% FOREACH HOUR OF DAY %> ... <% /FOREACH %> |
Loops through the hours of the day, so you can pull out events by hour. The first 'hour' returned is '99' which is code for 'All Day Events'. The first and last hours of the day that are returned are specified in the config file as 'days_hours_display_start' and 'days_hours_display_end' but there is no interface in the Calendar Admin to change them - they must be changed by hand. This loop works on the current $DAY reference, so this must be used in a context where $DAY is defined. Inside the loop, the $EVENTS variable is set to be a reference to the list of events for that hour of that day. |
| <% FOREACH EVENTLIST %> ... <% /FOREACH %> |
Loops through each day existing in the current view without respect to the grid. It sets the $DAY variable to be a reference to the day, and the $EVENTS variable to be a reference to the events for that day. |
| <% FOREACH EVENT %> ... <% /FOREACH %> |
Loops through each event in the current list of events held in the $EVENTS variable, setting the $EVENT variable to be a reference to each event. |
| <% FOREACH SEARCH RESULT %> ... <% /FOREACH %> |
Loops through each event that exists in the search results, if a search was done. It sets the $EVENT variable to be a reference to each event in the results. |
| <% IF SEARCH RESULT %> ... <% /IF %> |
Evaluates the block if a search was just executed. |
| <% IF SEARCH RESULTS EXIST %> ... <% /IF %> |
Evaluates the block if at least one search result is returned as a result of a search. |
| <% IF EVENTS EXIST %> ... <% /IF %> |
Evaluates the block if the current $EVENTS variable contains at least one event. |
| <% IF NO EVENTS EXIST %> ... <% /IF %> |
Evaluates the block if the current $EVENTS variable does not contain any events. |
| <% IF NEXT OCCURRENCE EXISTS %> ... <% /IF %> |
Evaluates the block if the current event held in the $EVENT variable is set to occur any time in the future. |
| <% IF DISPLAY %> ... <% /IF %> |
Evaluates the block if the $DAY variable contains a reference to a day which should be displayed. In a Grid display, for example, some of the grids do not contain actual dates, so you should not attempt to display the date number in that grid cell. |
| <% IF SELECTED %> ... <% /IF %> |
Evaluates the block if the current day in the $DAY variable is selected as the date to highlight or show in detail. |
| <% IF USER LOGGED ID %> ... <% /IF %> |
Evaluates the block if the current user is logged into the calendar. |
| <% IF ... %> block1 <% ELSE %> block2 <% /IF %> |
The ELSE tag is used in conjunction with the above conditional tags to define a block to evaluate if the condition is not true. |
| <%= EVENT FIELD(name) %> |
Outputs the value of the 'name' field in the event currently defined in the $EVENT variable. For example, 'title', or any other field defined in the Customize Event Fields screen. |
| <%= SCHEDULE FIELD(type) %> |
Outputs a part of the schedule for the current occurrence of the current event held in $EVENT. The following values are available for the value of 'type':
- start = gmtime() value of when the event occurrence starts.
- end = gmtime() value of when the event ends
- year = 4-digit year
- month = The month number, from 1-12
- date = The day of the month
- day = The day number, from 0-6
- datestring = The date in format yyyymmdd
- start_ss = The seconds value of the start time, 0-59
- start_mi = The minutes value of the start time, 0-59
- start_hh = The hours value of the start time, 0-23
- start_time = Formatted string of the start time, according to 12/24-hour format preference in config file
- end_ss = The seconds value of the end time, 0-59
- end_mi = The minutes value of the end time, 0-59
- end_hh = The hours value of the end time, 0-23
- all_day = 1 if this is an all day event, otherwise blank or 0
|
| <% LAST YEAR LINK %> , <% NEXT YEAR LINK %> |
The URL to navigate to the previous or next year. |
| <% LAST MONTH LINK %> , <% NEXT MONTH LINK %> |
The URL to navigate to the previous or next month. |
| <% LAST WEEK LINK %> , <% NEXT WEEK LINK %> |
The URL to navigate to the previous or next week. |
| <% PREVIOUS DAY LINK %> , <% NEXT DAY LINK %> |
The URL to navigate to the previous or next day. |
| $Config |
A reference to a Config object for the calendar. You can retrieve values from the config file for this calendar by using the syntax $Config->get("aCODEribute_name"). |
| $AdminConfig |
A reference to the Admin config file and functions the same way. |
| $Session |
A reference to a CGISession object, to retrieve or set values in the user's session. This will only apply if the user is logged in. It is most useful in the Admin templates. |
| $CGI_URL |
The URL of the calendar application, so you can link back to it or submit forms back to it. |
| $CGI_URL_QUERYSTRING |
The URL of the calendar application, but with all current display parameters aCODEached to the end of it. This should be used rather than $CGI_URL in most cases where you are making a link. |
| $QUERY_STRING |
The current display parameters in a URL-encoded query string. |
| $CGI_HIDDEN_FIELDS |
The current display parameters in HTML hidden fields. If you create a form that submits back to the CGI URL, include these hidden fields. |
| $ADMIN_CGI_URL |
The URL of the Calendar Admin application. |
| $User |
A reference to the User object of the user currently logged in. Fields in the user database can be accessed using $User->{fieldname}. You can also use $User->isCalendarAdmin(calendar_id) to determine if the user has any Admin permissions on the calendar with id "calendar_id". |
| $userMessage |
The text of any message that should be displayed for the user. |
| $YEAR_SELECT |
Contains the text of an HTML SELECT element containing a list of options for each year. If you have a form and want the user to select a year, simply output the value of this variable. |
| $MONTH_SELECT |
Contains the text of an HTML SELECT element containing a list of options for each month's full name. If you have a form and want the user to select a month, simply output the value of this variable. |
| $MONTH_ABBREVIATION_SELECT |
Contains the text of an HTML SELECT element containing a list of options for each month's abbreviation. If you have a form and want the user to select a month, simply output the value of this variable. |
| $DAY_NAMES |
A reference to an array of the names of days of the week. The name of the first day of the week would be $DAY_NAMES->[0]. |
| $DAY_ABBREVIATIONS |
A reference to an array of the abbreviations of days of the week. The abbreviation of the first day of the week would be $DAY_ABBREVIATIONS->[0]. |
| $MONTH_NAMES |
A reference to an array of the names of the months. The name of the first month would be $MONTH_NAMES->[0]. |
| $MONTH_ABBREVIATIONS |
A reference to an array of the abbreviations of months. The abbreviation of the first month would be $MONTH_ABBREVIATIONS->[0]. |
| $DAY_NAME_0 .. $DAY_NAME_6 |
Separate variables for the names of each day, 7 variables in all. |
| $DAY_ABBREVIATION_0 .. $DAY_ABBREVIATION_6 |
Separate variables for the abbreviations of each day, 7 variables in all. |
| $MONTH_NAME_0 .. $MONTH_NAME_11 |
Separate variables for the names of each month, 12 variables in all. |
| $MONTH_ABBREVIATION_0 .. $MONTH_ABBREVIATION_11 |
Separate variables for the abbreviations of each month, 12 variables in all. |
| $YEAR |
The 4-digit year of the currently displayed date. |
| $MONTH |
The month number of the currently displayed date. |
| $MONTH_NAME |
The month name of the currently displayed date. |
| $DATE |
The date of the currently displayed date. |
| $DATESTRING |
The yyyymmdd date string of the currently displayed date. |
| $LAST_YEAR |
The 4-digit year of the previous year from the one currently displayed. |
| $NEXT_YEAR |
The 4-digit year of the next year from the one currently displayed. |
| $LAST_MONTH_YEAR |
The 4-digit year of the previous month from the one currently displayed. If the current month is January, for example, this will be the previous year. Otherwise it will be the same year as the current. |
| $NEXT_MONTH_YEAR |
The 4-digit year of the next month from the one currently displayed. If the current month is December, for example, this will be the next year. Otherwise it will be the same year as the current. |
| $LAST_MONTH, $NEXT_MONTH |
The number of the previous month and next month from the one currently displayed. |
| $NEXT_MONTH_NAME, $LAST_MONTH_NAME |
The names of the previous month and next month from the one currently displayed. |
| $LAST_WEEK_YEAR, $LAST_WEEK_MONTH, $LAST_WEEK_DATE |
The year, month, and date of the week prior to the currently-displayed date. |
| $NEXT_WEEK_YEAR, $NEXT_WEEK_MONTH, $NEXT_WEEK_DATE |
The year, month, and date of the week after the currently-displayed date. |
| $PREVIOUS_DAY_YEAR, $PREVIOUS_DAY_MONTH, $PREVIOUS_DAY_DATE, $PREVIOUS_DAY_DATESTRING |
The year, month, date, and yyyymmdd date string of the date prior to the one currently displayed. |
| $NEXT_DAY_YEAR, $NEXT_DAY_MONTH, $NEXT_DAY_DATE, $NEXT_DAY_DATESTRING |
The year, month, date, and yyyymmdd date string of the date after the one currently displayed. |
| $TODAY_YEAR, $TODAY_MONTH, $TODAY_DATE, $TODAY_DATESTRING |
The year, month, date, and yyyymmdd date string of today's date, regardless of which date is currently being displayed. |
| $CALENDAR |
An object containing the properties of the currently-displayed calendar. |
| $RANGE_START |
A formatted date string (formatted according to config settings) representing the first date in the range currently being displayed. |
| $RANGE_START_YEAR, $RANGE_START_MONTH, $RANGE_START_DATE |
The year, month, and date of the first date in the range currently being displayed. |
| $RANGE_END |
A formatted date string (formatted according to config settings) representing the first date in the range currently being displayed. |
| $RANGE_END_YEAR, $RANGE_END_MONTH, $RANGE_END_DATE |
The year, month, and date of the last date in the range currently being displayed. |
| $EVENTS |
A reference to a list of $EVENT objects for every event displayed in the current view. |
| $GRID_ROW_COUNT, $GRID_COL_COUNT |
The number of rows and columns in the grid required to display all the dates in the current view. |
$Grid
$Grid->{rowcount}
$Grid->{colcount}
$Grid->{grid}->[y]->[x]->{dd}
$Grid->{grid}->[y]->[x]->{mm}
$Grid->{grid}->[y]->[x]->{yyyy}
$Grid->{grid}->[y]->[x]->{d}
$Grid->{grid}->[y]->[x]->{yd}
$Grid->{grid}->[y]->[x]->{dayname}
$Grid->{grid}->[y]->[x]->{dayabbreviation}
$Grid->{grid}->[y]->[x]->{monthname}
$Grid->{grid}->[y]->[x]->{monthabbreviation}
$Grid->{grid}->[y]->[x]->{datestring}
$Grid->{grid}->[y]->[x]->{display}
$Grid->{grid}->[y]->[x]->{selected}
$Grid->{grid}->[y]->[x]->{events}
$Grid->{grid}->[y]->[x]->{hours}->[hh]->{events}
|
$Grid is a reference to an object containing all the details of the grid required to display all the dates in the view. Each cell in the grid can be referenced by column and row, to retrieve the date details of that grid cell and the events that should be displayed in the cell. |
| $DAY |
Inside special tags that loop through days, the $DAY variable is set to the current day in the loop. Properties of $DAY are the same as those in each grid cell above. Special tags listed above also reference the current day held in the $DAY variable. |