WebCalendar
The WebCalendar server control displays Ektron calendars. See also: Working with 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>
- backColor (String)
The background color of the calendar event. If you set this value to
AutoSelect
, the next available color in the list is chosen automatically. - defaultId (String)
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).
- queryParam (String)
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).
- sourceType (String)
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.
Inserting the WebCalendar server control onto a page
Prerequisite
You must have installed the server controls. See Installing server controls into Visual Studio Toolbox.
- In Visual Studio, choose View > Toolbox.
- Click the Ektron server control tab to display the server controls.
- Drag the WebCalendar server control and drop it into the desired location on the page.
NOTE: You also can place the cursor on the page where you want the server control, then double click the server control that you want.
<CMS:WebCalendar ID="WebCalendar1" runat="server"></CMS:WebCalendar>
- Click on
WebCalendar
in the code to display and modify the control’s properties using the Properties window of Visual Studio. The page is updated as you modify the property values.
WebCalendar properties
The following are Ektron-specific server controla server control uses API language to interact with the CMS and Framework UI to display the output. A server control can be dragged and dropped onto a Web form and then modified. properties. For information about native .NET properties such as font, height, width and border style, use Visual Studio® help.
- AllowEventEditing (Boolean)
Determines whether users can add or edit calendar events. Default is True.
- DefaultDisplayType (String)
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.
- DisplayTemplatePath (String)
Specify the path to the code that controls how events are displayed. Default is blank.
- DisplayType (String)
Determines which time periods appear on the calendar. Choices are All, Day, Month, Week. Default is All.
- DoInitFill (Boolean)
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.
- DynamicParameter (String)
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, whereDyanamicParameter=”calendar_id”
, the URL may readhttp://mysite.com/calendar.aspx?calendar_id=”55”
. In this case, calendar 55 must be of the SystemCalendar type. - Hide (Boolean)
Hides or displays the output of the control in design time and run time.
- True. Hide the control output.
- False. Display the control output.
- Language (Integer)
Set a language for viewing content; shows results in design-time (in Visual Studio) and at run-time (in a browser).
- SuppressWrapperTags (Boolean)
Suppresses the output of the span/div tags around the control.
- True. Suppress wrap tags.
- False (default). Allow wrap tags.
- WrapTag (String)
Lets a developer specify a server control’s tag.
- Span (default). Designate an inline portion of an HTML document as a span element.
- Div. Apply attributes to a block of code.
- Custom. Lets you use a custom tag.