        
 |
This tutorial describes how to alter the view of your calendar using
URL parameters. Your calendar may need to look and behave differently
based on the viewer. The URL used by people that maintain the calendar
may need to be different than the URL used by the general public.
Using URL parameters, you can have links from your
Web site to different calendar views -- a year calendar, 10 day calendar, etc.
All calendar URLs begin with:
http://www.huntcal.com/cgi/calview.cgi/
followed by the group ID and the calendar ID.
This tutorial will use the
Mother Nature's Calendar,
which is one of our sample calendars.
The group ID of the Mother Nature's Calendar is mother. The
calendar ID is nature. This calendar is set up to view events as a list rather than
a wall calendar grid. The standard calendar URL for the Mother Nature's Calendar is:
http://www.huntcal.com/cgi/calview.cgi/mother/nature.
Note that the group ID and calendar ID are separated by a
forward slash: /
For the tutorial examples below, you may want to replace the group ID and
calendar ID with your own to see how the URL alterations affect your calendar.
The URL parameters follow the calendar ID and begin with a question mark (?).
Each parameter has a name and a value. Parameters are separated from one
another by an ampersand (&).
-
The first example is the most common and useful parameter setting:
http://www.huntcal.com/cgi/calview.cgi/mother/nature?vm=r
The parameter name is vm, and the value is r. This
tells the calendar system that the view mode is
read-only. Use this parameter setting to hide all editing buttons,
such as "Add Event" and "Calendar Admin". We'll show several other additional
settings for vm later on.
- Several calendar attributes can be changed from the Calendar Administrator's
page, but they can also be set dynamically using URL parameters:
- You can use more than one parameter to combine settings. For example:
cs=t&bg=w&pe=h tells the calendar system to use the tan color
scheme, a white background, and hide past events:
http://www.huntcal.com/cgi/calview.cgi/mother/nature?cs=t&bg=w&pe=h
Notice that parameters are separated by an ampersand (&).
- There are 5 event viewing modes: day, week, month,
advanced, and printer
friendly. The default viewing mode is month view.
- The "list view" calendar display is divided into two sections, a left side
and a right side.
The left side includes:
- the calendar table,
the eye icon that appears to the left of each week's row,
- month navigation controls (next/previous),
- and a viewing options selector.
|
The right side includes:
- the list of events,
- and a legend that identifies the edit, delete and reminder icons.
|
The values for vm can be combined. For example:
This tells the calendar system to remove the editing controls, month navigation,
viewing options and week view icons:
http://www.huntcal.com/cgi/calview.cgi/mother/nature?vm=r-l-m-v-w
- The width of the table surrounding the calendar and events can
be set using the tw parameter. This is useful if you have
a custom header, and the width of your
header is less than the default 702 pixels.
Example:
http://www.huntcal.com/cgi/aview/holidays/holidays?vm=rs-L&m=1&tw=414
Of course, you can also widen the calendar display:
http://www.huntcal.com/cgi/calview.cgi/conf/rooms?tw=800
- By default, events without start times are grouped by category. If you prefer to list
such events by the time they were created, use the se parameter. The value of the parameter should be "t".
Example:
http://www.huntcal.com/cgi/calview.cgi/mother/nature?se=t
Advanced viewing offers several useful features including keyword search,
event listing by date range or category.
A different CGI program handles advanced viewing commands, which requires
a different URL.
For advanced viewing commands, replace calview.cgi with
aview in the URL. Most of the parameters listed above also
apply to advanced view. However, only the m,
d, and yr parameters are supported by calview.cgi.
Advanced viewing allows the viewer to enter a beginning and ending date,
a list of keywords, and select one or more categories. This input can
be specified using URL parameters to provide useful views of
the calendar events.
If you need a calendar view not supported by
the parameters specified above, let us know.
|
|
|