Friends
The Friends server control typically appears on your profile page and displays your friends (colleagues). If you browse to another user's profile, you see that user's colleagues.
Inserting the Friends 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 Friends 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:Friends ID="Friends1" runat="server" />
- Click on
Friends
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.
Friends 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.
- AvatarHeight (Integer)
The display height in pixels of the avatar in the results box. 0 (zero) = unlimited.
- AvatarWidth (Integer)
The display width in pixels of the avatar in the results box. 0 (zero) = unlimited.
- 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.
- DefaultFolderID (Long)
The folder ID that contains the user ID to display. If a DefaultContentID is given, it overrides this property.
- DefaultUserID (Long)
The default user ID for this control if no matching dynamic parameter value is passed.
- DisplayMode (eDisplayMode)
Select the way this control displays colleagues. Choices are:
- Directory. Allows users to group colleagues by folders. In this mode, these menu items appear.
- Add Folder. Lets user add a folder.
- Move. Lets a user place colleagues in a folder. This option appears only if a folder exists.
- List. Lists colleagues in alphabetical order
- Pending. Lists users who have sent colleague requests to the logged-in user. The user can approve or decline these requests.
- SentInvites. Lists users to whom the logged-in user sent colleague requests. The user can cancel invitations that have not been accepted yet.
- 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.WARNING!
If you enter a valid EkML file at the MarkupLanguage property, the Displayxslt property value is ignored. - 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)
Gets or sets the QueryString parameter to read a user ID dynamically. To use the default user ID, leave blank.
- FriendLabel (String)
Set the singular text to be used as a title for the Friends server control. The default value is Colleague.
- FriendsLabel (String)
Set the plural text to be used as a title for the Friends server control. The default value is Colleagues.
- 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).
- Link (String)
Enter a link to the user profile page template. The path can be relative or absolute. This value is referenced when a user clicks another user in the Friends control. Upon clicking the link, the selected user’s profile page appears. The link requires these variables.
- {0}. Represents user ID
- {1}. Represents user display name
For example:
userprofilepage.aspx?uid={0}&dn={1}
- LinkTarget (ItemLinkTargets)
Determines the type of window that appears when you click a link in the server control.
- _Self (default). Opens in same window.
- _Top. Opens in parent window.
- _Blank. Opens in new window.
- _Parent. Opens in the parent frame.
- MarkupLanguage (String)
Enter the template markup file (
.ekml
) that controls the display of this server control. To use the default .ekml file, leave this field blank.The default file follows this pattern:\siteroot\Workarea\template\this object\objectname.ekml
. For example,\siteroot\Workarea\template\collection\collection.ekml.
To customize the default .ekml file, copy it to a folder outside thesiteroot\workarea
folder and edit it. Next, in this property, enter the path to that file relative to the site root folder.See also: Ektron Markup Language - MaxResults (Integer)
The maximum number of colleagues to display in the control. 0 (zero) = unlimited.
- ShowSortingOptions (Boolean)
Determines if sorting options appear on the control. If set to True, the following options appear:
- Colleagues. All current colleagues
- Pending. Colleagues who sent you a colleague request that you have not yet accepted
- Invited. Colleagues to whom you have sent colleague requests
- 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.NOTE: If you enter a valid EkML file at the
MarkupLanguage
property, theStylesheet
property is ignored. - 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.
Using the Friends server control
The Friends server control displays a list of:
- current colleagues. Users who accepted your invitation to be a colleague, or whose invitation to be a colleague you accepted
- pending colleagues. Users who sent you a colleague request, which you have not yet accepted
- invited colleagues. Users to whom you have sent a colleague requests, which has not yet been accepted
The control can lets you navigate between views.
To manage existing colleagues on the website, find the Colleague area of your profile page. Here you can view, approve, and remove colleagues.
Managing colleagues
Accepting a colleague request
Accepting a colleague request adds the user to your colleagues list. This lets you access additional information on the colleague's profile page.
- Navigate to the Pending colleagues area of your profile page.
- Place a check in the box next to each colleague whose request you want to accept.
- Click Approve. The page refreshes, and the selected users are removed from the Pending Colleagues list and added to the colleagues list.
Declining a colleague request
Declining a colleague request cancels the request. When you decline the request, it is removed from your Pending Colleagues list and the requester’s Invited list.
- Go to the Pending Colleagues area of your profile page.
- Place a check in the box next to each colleague whose request you want to decline.
- Click Remove Selected. A dialog asks you to confirm.
- Click OK. The page refreshes, and selected users are removed from your Pending Colleagues list and requester’s Invited list.
Viewing invited colleagues
The Invited colleagues list displays users to whom you have sent colleague invites. From this screen, you can delete requests that have not yet been accepted. See also: Viewing invited colleagues To view sent colleague requests, go to the Invited Colleagues area of your profile page.
Designating a selected colleague
Selected colleague is a special category of user who can be given access to documents and photos that regular colleagues cannot view. A user makes this designation when sharing a Workspace, which can be shared with the Public, all colleagues, or selected colleagues.
- Go to the Colleagues area of your profile page.
- Check the box next to each colleague you want to make a Selected Colleague.
- Click Update. Selected Colleague appears next to the colleague.
To change a selected colleague back to a colleague, check the box next to a selected colleague and click Update.
Creating a colleague group folder
Grouping lets you organize colleagues by folder. For example, you place all family members in a "Family" folder. You can only group current colleagues, not colleagues who are pending or invited.
Creating a colleague group folder
- Make sure the
DisplayMode
property of the Friends server control is set to Directory. - Log in to the website.
- Navigate to your profile page or a page the contains a Friends server control.
- Click Add Folder in the Friends server control.
- Enter a Name and Description for the folder.
- Click OK.
Deleting a folder
WARNING! Deleting a folder deletes all colleagues within it. To retain the colleagues, move them from the folder first by clicking the folder, checking the colleague, and clicking Move Up One Level.
Deleting a folder also deletes all of its subfolders.
- Navigate to your profile page or a page the contains a Friends server control.
- In the Colleagues section of the screen, click Edit Folder () next to the folder’s title. A dialog box appears.
- Click Delete.
- Click Save.