ActivityStream
The ActivityStream server control displays notification messages generated by Ektron’s Notification system. See also: Notifications
When this control is added to a Web page, Ektron looks for a DefaultObjectID
defined in properties. If one is found, the activity stream is based on that user or group. If none is found, notifications are based on the pages’s dynamic query string parameter, which typically identifies the logged-in user.
You can exclude any user or a group from the activity stream. To achieve this, open the page that hosts the Activity Stream server control, find the control, and add the following to the control’s code-behind.
//activityStream cmsActivityStream.ExcludeUserIds.Add(this.ProfileId); You can also exclude groups. cmsActivityStream.ExcludeGroupIds.Add(GroupId1); cmsActivityStream.ExcludeGroupIds.Add(GroupId2); : cmsActivityStream.ExcludeGroupIds.Add(GroupIdN);
To add this control to a page, drop it on a Web form and set the following properties.
- DefaultObjectID. If you want a user’s or community group’s activity stream to appear in the control, enter that ID.
- DefaultObjectParameter. Enter the default object parameter used on the QueryString to define an object’s ID. For example, if you are passing the ID value of a community group, you might enter ‘gid’ for this property. So, if you pass
http://~yoursite~/CGHome.aspx?gid=21
in the query string to a page containing this control, you see the activity stream for the community group whose ID is 21. - ObjectType. Select the whether the control is associated with a user or Community Group
- TemplateUserProfile and ProfileParamName. If you want a user’s avatar in the activity stream to be a clickable link that leads to the user's profile page, set these properties.
Inserting the ActivityStream 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 ActivityStream 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:ActivityStream ID="ActivityStream1" runat="server" />
- Click on
ActivityStream
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.
ActivityStream 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.
- CacheInterval (Double)
The number of seconds that a 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.’s data is cached. The default is 0 (zero). For example, if you want to cache the data for 5 minutes, set to 300. See also: Caching with server controls.
- DefaultObjectID (Long)
The ID of the object whose activity stream will appear where you place this server control. For example, if you want this control to display Scott Markey’s activities, and his USER ID is 142, place 142 here, and set the
ObjectType
property to User. To display the activity stream for the logged-in user, enter zero (0). - DisplayXslt (String)
If desired, enter a relative or absolute path to an Xslt that determines the display of the page.
WARNING! Files stored in the
siteroot\Workarea
folder are overwritten (or deleted) when you upgrade Ektron. To avoid problems, copy the default file to a folder outside thesiteroot\workarea
folder then edit it. If there is no default file, create the file outside thesiteroot\workarea
folder. Next, in this property, enter the path to that file relative to the site root folder. - 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.
- DynamicObjectParameter (String)
Gets or sets the QueryString parameter to read a object ID dynamically. To use the default object ID, leave blank. For example, if you are passing the ID value of a community group, you might enter ‘gid’ for this property. So, if you passed
http://~yoursite~/CGHome.aspx?gid=21
on the Query Strings to a page containing this control, you would see the activity stream for the group with an ID of 21. - EnablePaging (Boolean)
This property, in conjunction with the MaxNumber property, lets site visitors view an unlimited number of items while controlling the amount of screen space. The MaxNumber property limits the number of items displayed. If you set this property to True, and the number of items exceeds MaxNumber, navigation aids appear below the last item, allowing the visitor to go to the next screen.
- 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).
- MaxResults (Integer)
The Maximum number of notifications to fetch. 0 (zero) = unlimited.
- ObjectType (ActivityFeedType)
The type of object to which this control is assigned. Choices are:
- User. Control is assigned to an individual
- Group. Control is assigned to a community group
- ProfileParamName (String)
The parameter name to pass in the QueryString to the TemplateUserProfile page, if you want it to be anything other than id. For example, you may prefer
userid
, because it is more descriptive, as shown in the following example. - Stylesheet (String)
Specify the path to a style sheet for use with this server control. Leave blank to use the default style sheet. To use a custom style sheet, place it in a folder outside the
siteroot\workarea
folder then edit it. Next, in this property, enter the path to the custom style sheet relative to the site root folder. - SuppressWrapperTags (Boolean)
Suppresses the output of the span/div tags around the control.
- True. Suppress wrap tags.
- False (default). Allow wrap tags.
- TemplateActivity (String)
The URL path to a page that contains another ActivityStream server control.
When this property contains a path and the destination page has an ActivityStream control whoseObjectType
property is set toActivity
, a user can click an Activity Stream’s time span on the first page to open a second page that contains just that activity. See also: Viewing a customer orders list. - TemplateUserProfile (String)
The URL path to a page that contains the UserProfile server control. The path can be relative or absolute. If you enter a path, a user can click a user’s name or avatar from the Message Board server control and be forwarded to the profile page. See illustration.
User templates can be defined in the Ektron Workarea > Settings > Community Management > Templates screen. However, if you assign a template in this field, this setting takes precedence over the setting on the Workarea Template screen.
- 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.