gCalMarkup three define commands to create calendars, calendar groups, and categories. At least one define calendar command is required. The others are optional. The following tables describe the syntax of each command:

 

{gCalDefine calendar id="[group id.]calendar id" key="key" [parameterName="parameterValue"] .../}

The define calendar command tells gCalMarkup how to access a calendar. It also creates a calendar id and possibly a group id used to tie the calendar to the correct gCalMarkup template. A define calendar command is required for each calendar used. There are two required parameters, id & key. Any number of additional user parameters can be added (e.g. color="#0080D0"). The command is removed from the article text after parsing. For example:

  • {gCalDefine calendar id="races" key="This email address is being protected from spambots. You need JavaScript enabled to view it. " maxDays="60" color="#0080D0"/}
Parameter

Type

Default

Required

Description

group id

Alphanumeric

_default

No/Yes

The id of the group this calendar is a member of (all calendars in this group are displayed together). If no group is specified the calendar is placed in the default group along with any other calendars that don't have a group. Required if more than one group is used. Group ids are case sensitive.

calendar id

Alphanumeric

_default

No/Yes

The id of this calendar. If more than one calendar is used, id is required. The id is also used to associated templates and other commands with this calendar. Calendar ids are case sensitive.

key

Alphanumeric

--

Yes

A key that allows gCalMarkup to find the desired Google Calendar™. See the Google Calendars section for help finding the calendar key (Google Calendar ID).

maxResults="5"

Integer

50

No

the maximum number of events to return from this calendar

maxDays="8"

Integer

365

No

the maximum number of days to return events for

orderBy="lastmodified"

Key words

'starttime'

No

sort events by 'lastmodified' or 'starttime'

sortOrder="descending"

Key words

'ascending'

No

sort events in 'ascending' or 'descending' date order.

singleEvents="false"

Boolean

true

No

indicates whether repeating events should be expanded

name="value"

Alphanumeric

 

No

User parameters are used to define attributes of this calendar that can later be used to identify this calendar or events from this calendar. For example a title="My Calendar" or color="red" can be specified here and later used in a template to add a pop-up calendar name, or color events from the calendar red. Any number of user defined parameters can be added. See the tutorial for examples of the use of user parameters. +++ add link

 

{gCalDefine category id="[[group id.]calendar id.]category id" [user parameter name]="[user parameter value]" .../}

The gCalDefine category command creates a category of events. Categories are used to determine which events from a calendar are displayed.  They are used to create the allowable selections in a drop-down box.  If there is no drop-down box, they are used to determine which events from a calendar are displayed. (If there are no categories, all events are displayed).  Categories are also used to add attributes to categories of events, for example, the color.

A category can be all events in a group , all events in a calendar, or all events with a specified category tag in the event content. The category id defines which type of category is being created. Any number of additional user parameters can also be added and used in gCalMarkup templates to indicate what category events are in. For example:

  • {gCalDefine category id="10K"/} defines a category of all events with a [category=10K] tag in the decription from the default calendar and group.
  • {gCalDefine category id="races."/} defines a category of all events in the "races" calendar in the default group
  • {gCalDefine category id="b.races."/} defines a category of all events in the "races" calendar in group "b"
  • {gCalDefine category id="b.races.5K"/} defines all events in the same calendar with a [category=5K] tag in the event description.
Parameter

Type

Default

Required

Description

group id

Alphanumeric

_default

No

The id of the group this calendar is a member of. If no group is specified the calendar is placed in the default group along with any other calendars that don't have a group. Group ids are case sensitive.

calendar id

Alphanumeric

_default

No

The id of the calendar this category is a member of. Calendar ids are case sensitive.

category id

Alphanumeric

--

No

The id of this category. Category ids are case sensitive.

name="value"

 

 

No

see above

 


 

{gCalDefine group id="group id" [user parameter name="user parameter value"] .../}

The gCalDefine group command creates a new calendar group. Groups are used to display events from multiple calendars together. Any number of additional user parameters can also be added.  For example:

  • {gCalDefine group id="a" maxResults="10"} - define a group named "a" with a maximum of 10 displayed events
Parameter

Type

Default

Required

Description

group id

Alphanumeric

_default

No/Yes

see above

maxResults="5"

Integer

50

No

The maximum number of events to return from this group. Note that this applies to the total number of events from all of the calendars in the group.

[user parameter]

 

 

No

see above