Web Calendars keep site visitors informed about upcoming events. Any authorized user can add events to a calendar. Ektron has System, User, and Group calendars. The calendar type determines where events are stored in the database, and what permissions are needed to edit them.
|
System Calendar |
User Calendar |
Group Calendar |
Where events are stored |
Workarea > Content > Calendar Folder |
Community User Calendar |
Community Group Calendar |
Where events are added or edited |
The Web page or Workarea folder |
The community user’s profile Web page |
The community group’s Web page |
Where permissions are set |
Folder Permissions |
Community Users and Colleagues |
Community Group Membership |
How it appears on a Web page |
Web page with Server Control or Widget |
||
For more information, see |
When first viewed, a Web calendar shows the current day, month, or week, whether you are on a Web page or in the Workarea. After logging in, you can add or edit calendar events if you have permission to do so.
DisplayType
property determines the appearance of these buttons. See Also: Using the WebCalendar Server Control.)Prerequisite: To add, edit or delete a calendar, you must be a member of the Administrators Group or have permission to Add, Edit, and Delete folders on the Advanced Permissions screen. See Also: Standard and Advanced Permissions
To create a system calendar:
Enter a Style Sheet.—Specify a style sheet that defines styles that may be applied to event content in this folder. The style sheet must reside in the site root folder. Or, leave this field blank to inherit the parent folder’s style sheet. The style sheet populates the style drop-down list within the editor.
NOTE: This style sheet affects event content being edited. It does not necessarily affect the content’s appearance on your Web site. To set or edit the style sheet that determines your Web pages’ appearance, open the page’s Web form and place a <link rel=”stylesheet”...
tag within its <HEAD>
tags. If desired, you can identify the same style sheet in both locations. To include user-selectable styles, they must be generic classes.
Note that the system calendar icon is unique ().
After creating a calendar, you may add events.
Prerequisite: You logged into Ektron and have edit permission for the calendar. Calendars have the same permission and approval settings as folders. See Also: Managing Folder Permissions, Approval Chains
To add or edit a system calendar event:
Ektron stores event times as UTC (also known as Greenwich Mean Time—GMT). For members or visitors that login, events show in the member’s time zone. For visitors that do not log in, events show in the Web server’s time zone. For information about setting the user time zone, see Time Zone Field.
When editing a recurring event, you are prompted to edit either the single occurrence or the series.
You can export Web calendar appointments to any calendar that accepts an iCalendar *.ics file. This is helpful if you want to track appointments on your Web calendar and a mobile device calendar, for example.
NOTE: Ektron uses accepted standards for producing the iCalendar ics file. This does not mean that all calendar types use the recurring appointment data properly. Contact your calendar vendor if iCalendar support is needed.
WARNING! Changes to recurring appointments do not work correctly for iCal files used in Microsoft Office 2003.
Prerequisites: You are logged into the Ektron Web site and are a member of the Administrators group or assigned the Calendar-Admin role
To export a Web Calendar event to another calendar:
NOTE: If you are adding the appointment to a calendar other than the default calendar on your PC, first open that calendar and import or add the *.ics file to it. For example,when using a Google Calendar, click Add then choose import. See your calendar's instructions for importing iCalendar appointments.
A new or updated Calendar event appears on a Community Activity Stream if the following notification settings are checked on a user's or Membership Group's Profile > Activities tab. For more information, see Notification Message Recipients.
The Calendar properties screen lets you set permissions as well as modify the calendar’s metadata, taxonomy, templates, flagging, Web Alerts and Breadcrumbs. To view a system calendar's properties:
To learn more about the properties, see Adding a Calendar
Both community group and community user profile pages can display a Web Calendar. The following example shows a user profile page with a personal calendar.
The calendar on a personal community page obeys the same community rules as other features in the community. You can restrict the visibility of your events to only colleagues or make them public.
You can place a Web calendar on a user profile to track personal appointments. The following code places a WebCalendar server control on a User Profile template. You must set sourceType
and dynamicParameter
as shown.
<CMS:WebCalendar ID="WebCalendar1" runat="server" > <DataSource> <CMS:CalendarDataSource sourceType="UserCalendar" dynamicParameter="id” > </DataSource> </CMS:WebCalendar>
To use a personal calendar, you must add it to the database. Each user needs to do this when they decide to use a calendar on their profile.
To add a user calendar to the database:
Alternatively, you can log into the Workarea then go to Settings > Users > User Profile.
WARNING! After you save this profile, you cannot later uncheck this option.
You can add a Web Calendar to any Ektron community group. The following is a sample calendar on a group page.
The calendar on a community group page obeys the same community rules as other community features. You can restrict the visibility of group events to group members, or make the calendar public.
NOTE: An alternate way to use group calendars is using the WebCalendar Widget on a group dashboard. See Using the Web Calendar Widget for more information.
The following example provides the code for placing a WebCalendar server control on a Group Profile template. You must set sourceType
and dynamicParameter
as shown for CalendarDataSource
.
<CMS:WebCalendar ID="WebCalendar1" runat="server"> <DataSource> <CMS:CalendarDataSource sourceType="GroupCalendar" dynamicParameter="id”/> </DataSource> </CMS:WebCalendar>
To use a group calendar, you must add it to the database. Each group needs to do this once when they decide to have a calendar for their group.
To add a group calendar to the database:
WARNING! After you save this profile, you cannot later uncheck this option.
The Web Calendar can be customized in many ways. The following examples show some ways.
When you hover over a calendar event, a tooltip automatically shows its details.
You can change how this tooltip looks and behaves by modifying the telerik:RadToolTip
properties. You can apply many changes to a tooltip, but the following example makes the tooltip appear without delay and use fade-in animation. The example below uses the EktronTech starter site.
First, add a calendar event and observe the default behavior. Then, follow these steps.
Display.ascx
and Display.ascx.cs
files from this foldersiteroot\workarea\WebCalendar\DefaultTemplate
siteroot\CustomUserControls
.WARNING! You should copy these files and move them to a folder outside the \Workarea
folder. Upgrades overwrite \workarea
folder files.
Telerik:RadToolTip
server control.Property | Value | Default Value |
ShowDelay | 0 | 400 |
Animation | Fade | None |
DisplayTemplatePath
property with the location of the revised display.ascx file. For example: /CustomUserControls/display.ascx
. See Also: Using the WebCalendar Server Control.The Web calendar style sheet is WebCalendar.css
. It is located in the folder siteroot\workarea\WebCalendar\View
.
Modify the .RadScheduler
classes to change the Web calendar's style. Below are sample changes.
Example |
CSS Style Change |
Color
|
.RadScheduler .rsDateHeader { font-size: 12px; padding: 1px 4px 3px; text-decoration: none; color: green } |
Uppercase
|
.RadScheduler .rsSpacerCell, .RadScheduler .rsVerticalHeaderTable th, .RadScheduler .rsHorizontalHeaderTable th { border-style: solid; text-transform: uppercase } |
The calendar widget can display a combination of system, user, and group calendars. You place a Web calendar on a Web page by using either a WebCalendar server control or a Web Calendar widget. A Web Calendar widget is an easy way to add a calendar to a PageBuilder page or Smart Desktop (See Also: Personalizing the Smart Desktop.)
A system calendar is one that is managed within Ektron Workarea. For more information, see Adding a Calendar.
To add a system calendar to a calendar widget:
To add your user calendar to a Web Calendar widget:
To show one or more Group calendars on a Web Calendar widget, follow the steps below.
The WebCalendar server control displays Ektron calendars.
NOTE: On a PageBuilder page, use the Calendar widget to insert a calendar.
The following code example shows the WebCalendar server control.
<cms:WebCalendar ID="webcalendar" runat="server" DynamicParameter="calendar_id" DisplayType="Day"> <DataSource> <cms:CalendarDataSource defaultId="724"sourceType="SystemCalendar"/> </DataSource> </cms:WebCalendar>
The following are Ektron-specific server control properties. You can find information about native .NET properties such as font, height, width and border style in Visual Studio® help.
Determines whether users can add or edit calendar events. Default is True.
Specify the default calendar display. The default is Month, which means that the month view appears on the Web page. The site visitor can change the view.
Specify the path to the code that controls how events are displayed. Default is blank. See Also: Customizing the Web Calendar Tooltip
Determines which time period choices are presented on the calendar. Choices are All, Day, Month, Week. Default is All.
By default, Fill occurs during the Page_Init event. Set to false if you want to postpone the fill-action until later. In this case, Fill is automatically called during the Page Render event. You might do this if you need to set or change a property on the control in code-behind and have it render with your changes shown.
To make this calendar dynamic, select calendar_id. When you do, this server control uses the calendar passed as a URL parameter. To exclude this function, choose None- Use Default. Only Calendars with sourcetype=SystemCalendar
may be used in the querystring for this value. For example, where DyanamicParameter=”calendar_id”
, the URL may read http://mysite.com/calendar.aspx?calendar_id=”55”
. In this case, calendar 55 must be of the SystemCalendar type.
Hides or displays the output of the control in design time and run time.
Set a language for viewing content; shows results in design-time (in Visual Studio) and at run-time (in a browser).
Suppresses the output of the span/div tags around the control.
Lets a developer specify a server control’s tag.
The following list shows properties set inside the <DataSource> <CalendarDataSource>
tag.
The background color of the calendar event. If you set this value to AutoSelect
, the next available color in the list is chosen automatically.
The Id of the SystemCalendar, GroupCalendar or UserCalendar to display on the Web page. For more information about using this property, see Combining Web Calendars (Mashups).
The parameter that may be in the query string to mash-up additional calendars. This can be any Calendar SourceType. For example, if the value is set to uid, then the querystring can be:
.../calendar.aspx?calendar_id=”55”&uid=”440”
For more information about using this property, see Combining Web Calendars (Mashups)
Choices are SystemCalendar, GroupCalendar, UserCalendar. See Also: Combining Web Calendars (Mashups)
NOTE: The CategoryID property set inside the <DataSource> <CategoryID>
tag is used to identify taxonomy categories to filter calendar events. See Also: Using Taxonomy with Web Calendars
A Calendar Mashup combines events from different calendars into one calendar view. As an example, you could combine company meetings from one calendar with a special seminar series from another.
The ways to combine calendar events are described below.
The dynamic method uses the URL query string parameter to specify a calendar. This method maintains one calendar template that can display many calendars on your site. The following example uses the EktronTech starter site. The exercise combines calendars using a URL whose query parameter is cal2: http://<servername>/ektrontech/calendar.aspx?cal2=376
To combine 2 calendars:
calendar.aspx
template that contains the Web calendar. In this example, the template is located on the Web server in this folder: d:\inetpub\wwwroot\EktronTech
.CalendarDataSource
tags: one for a static calendar, the other for a dynamic calendar.CalendarDataSource
property, add defaultId = “88”
.CalendarDataSource
property, add queryParam = “cal2”
. This lets you display any calendar referenced in the query string.CalendarDataSource
tags, set the sourceType = “SystemCalendar”
property. The finished code looks like this.<cms:WebCalendar ID="webcalendar" runat="server" DynamicParameter="calendar_id" DisplayType="All" SuppressWrapperTags="True"> <cms:WebCalendar ID="webcalendar" runat="server" DynamicParameter="calendar_id" DisplayType="All" SuppressWrapperTags="True"> <DataSource> <cms:CalendarDataSource defaultId="88" sourceType="SystemCalendar"/> <cms:CalendarDataSource queryParam="cal2" sourceType="SystemCalendar"/> </DataSource> </cms:WebCalendar>
calendar.aspx
.http://<servername>/ektrontech/calendar.aspx?cal2=376
You see the combined calendar events. If there are too many events to show on a date, clock more... to see all events.
The static method of combining calendars "hard codes" calendar id numbers instead of using a query string parameter. This method creates a calendar whose event source does not change dynamically.
calendar.aspx
template. CalendarDataSource
properties, add defaultId values for each calendar as shown.<cms:WebCalendar ID="webcalendar" runat="server" DynamicParameter="calendar_id" DisplayType="All" SuppressWrapperTags="True"> <DataSource> <cms:CalendarDataSource defaultId="88" sourceType="SystemCalendar"/> <cms:CalendarDataSource defaultId="376" sourceType="SystemCalendar"/> </DataSource>
In this example, events for calendars 88 and 376 are combined on the calendar.aspx
page.
The following example displays a calendar according to a dynamic parameter in the query string. If the query string parameter is not used, the calendar shows a mashup of 3 calendars. The following example assumes you created 3 calendars with IDs 88, 374, and 376.
This is the code for the events.aspx
template.
<cms:WebCalendar ID="webcalendar1" runat="server"> <DataSource> <cms:CalendarDataSource sourceType="SystemCalendar" > </cms:CalendarDataSource> </DataSource> </cms:WebCalendar>
This is the code-behind which tests for a query parameter. If none is found, display a static calendar mashup.
events.aspx.vb
‘This code is located in the Page_Load event Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load ‘Create a CalendarDataSource instance and set the sourceType and queryParam Dim cds As New Ektron.Cms.Controls.CalendarDataSource() cds.queryParam = "calid" cds.sourceType = Ektron.Cms.Controls.SourceType.SystemCalendar ‘Add the DataSource object webcalendar1.DataSource.Add(cds) ‘If the queryString is used, show that calendar, otherwise show the following mashup If (Request.QueryString("calid") = String.Empty) Then ‘Create three CalendarDataSource instances and add the sourceType and defaultId for each. cds = New Ektron.Cms.Controls.CalendarDataSource() cds.sourceType = Ektron.Cms.Controls.SourceType.SystemCalendar webcalendar1.DataSource.Add(cds) cds = New Ektron.Cms.Controls.CalendarDataSource() cds.sourceType = Ektron.Cms.Controls.SourceType.SystemCalendar cds.defaultId = 88 webcalendar1.DataSource.Add(cds) cds = New Ektron.Cms.Controls.CalendarDataSource() cds.sourceType = Ektron.Cms.Controls.SourceType.SystemCalendar cds.defaultId = 376 webcalendar1.DataSource.Add(cds) End If ‘Fill and return webcalendar1.Fill() End Sub
events.aspx.cs
//This code is located in the Page_Load event protected void Page_Load(object sender, System.EventArgs e) { //Create a CalendarDataSource instance and set the sourceType and queryParam Ektron.Cms.Controls.CalendarDataSource cds = new Ektron.Cms.Controls.CalendarDataSource(); cds.queryParam = "calid"; cds.sourceType = Ektron.Cms.Controls.SourceType.SystemCalendar; //Add the DataSource object webcalendar1.DataSource.Add(cds); //If the queryString is used, show that calendar, otherwise show the following mashup if ((Request.QueryString("calid") == string.Empty)) { //Create three CalendarDataSource instances and add the //sourceType and defaultId for each. cds = new Ektron.Cms.Controls.CalendarDataSource(); cds.sourceType = Ektron.Cms.Controls.SourceType.SystemCalendar; webcalendar1.DataSource.Add(cds); cds = new Ektron.Cms.Controls.CalendarDataSource(); cds.sourceType = Ektron.Cms.Controls.SourceType.SystemCalendar; cds.defaultId = 88; webcalendar1.DataSource.Add(cds); cds = new Ektron.Cms.Controls.CalendarDataSource(); cds.sourceType = Ektron.Cms.Controls.SourceType.SystemCalendar; cds.defaultId = 376; webcalendar1.DataSource.Add(cds); } //Fill and return webcalendar1.Fill(); }
To see a single calendar such as 376, use this URL:
http://<server>/cms400developer/events.aspx?calid=376
To see all calendars together, do not use the query string parameter.
http://<server>/cms400developer/events.aspx
You can use taxonomy categories to filter calendar events. Calendar categories could include meeting rooms, audience, or whether the event should appear on a special public calendar. The following example organizes events based on locations and audience. See Also: Introduction to Creating a Taxonomy
After you create a taxonomy, you can assign its categories to events.
Use a CategoryID
value in the CalendarDataSource
to filter events according to taxonomy categories. In the following example, the calendar shows events for the Training Center (category 123) or Administrators (category 124).
<cms:WebCalendarID="webcalendar"runat="server"> <DataSource> <cms:CalendarDataSourcedefaultId="726"sourceType="SystemCalendar"> <CMS:CategoryIDcategoryId="123"/> <CMS:CategoryIDcategoryId="124"/> </cms:CalendarDataSource> </DataSource> </cms:WebCalendar>
By using an ID of a higher category in the taxonomy tree, you can show all events under it. For example, this taxonomy has 2 higher level branches with ID 100 and 200.
If you set the category ID to 100, you see any events associated with categories 100, 111 or 112.