Ektron CMS400.Net Reference

>>Managing User Communities > Favorites Server Control

Favorites Server Control

The Favorites server control displays a list of Ektron CMS400.NETcontent and external web links (URLs)that a user has designated as favorite content. Within the control, Ektron CMS400.NETcontent and URLs appear in separate lists.

To view favorite content, click Content. To view a list of external URLs, click Link.

To learn about designating Ektron CMS400.NET content as a favorite, see SocialBar Server Control. This following topic explains how to designate a URL link as a favorite.

Adding a URL to Your Favorites via the Favorites Control

Users can add a URL to their Favorites by clicking

To add a URL using the Favorites server control, follow these steps.

1. Log-in and navigate to the profile page that hosts the Favorites control.

2. Click Add Link.

3. In the Name field, add a name for the URL link.

4. In the Link field, add the URL.

5. In the Description text area, add a description for the URL. This is optional.

6. Click OK.

After a URL is added, it appears on the control's Links list.

Grouping Favorites by Folder

The DisplayMode property controls whether a user’s Favorites are displayed as a basic list, or if they can be organized in folders. For example, a user groups all content created by a certain author in a folder with that author’s name.

If you add a folder to a user’s favorites, content in the folder appear in the Content list; URLs in the folder appear in the Links list.

Moving Favorites to a Folder

To move a Favorite to a folder, follow these steps.

1. Make sure the Favorites server control's DisplayMode property is set to Directory.

2. Log in to the Web site.

3. Navigate to your profile page or the page the contains the Favorites server control.

4. In the Favorites server control, click Add Folder.

5. Enter a Name and Description for the folder.

6. Click OK.

7. Check one or more favorite items.

8. Click Move on the Favorites server control.

9. Select a folder to which the items will be moved.

10. Click OK.

11. A dialog box appears asking you confirm moving the items. Click OK.

The Favorite content can now be found under the folder. Click the folder to see all content in that folder.

Deleting a Folder

Warning! Deleting a folder also deletes all content links and URL links in the folder. If you want to retain the links, move them out of the folder before deleting it. To remove a link from a folder, click the folder, check the link, and click Move Up One Level.

Warning! Deleting a folder also deletes all of its subfolders.

To delete a folder, follow these steps.

1. Navigate to your profile page or a page the contains a Favorites server control.

2. In the Favorites section of the screen, click Edit Folder () next to the folder’s title.

3. A dialog box appears.

4. Click Delete.

5. You are asked if you are sure you want to delete the folder. Press OK.

6. Click Save.

Changing a Folder’s Name or Description

You can change a folder’s name or description by clicking Edit Folder () next to the folder’s title. Clicking the icon launches a dialog box that allows you to edit the name or description.

Once the changes are made, click Save.

Favorites Server Control Properties

The Favorites server control properties are described in this table.

Note: The following table only lists Ektron-specific properties. It does not describe native .NET properties such as font, height, width and border style. For documentation of these properties, see Visual Studio help.

Property

Description

Data Type

Authenticated

Indicates if you are logged in to the CMS Explorer and can use it to browse to Content, Collections, etc.

See Also:

Working with Ektron CMS400.NET Server Controls

String

CacheInterval

Sets the amount of time, in seconds, that the server control’s data is cached. The default is 0 (zero).

For example, to cache the data for five minutes, set to 300. See Also: Caching with Server Controls

Double

DefaultUserID

The default user ID for this control to use when there is no matching dynamic parameter value passed.

Long

DisplayMode

Select the way this control displays community group information. Choices are:

List—shows a list of Favorites sorted in alphabetical order.

Directory— groups favorites by folder. If this selection is chosen, the following menu items are added to the control:

  • Add Folder—allows a user to add a sub folder.
  • Move—allows a user to move content to a folder. This item only appears if at least one folder exists. See Also: Grouping Favorites by Folder

eDisplayMode

DisplayXslt

Determines how information is displayed on the page. Enter the path to the XSL file. It can be relative or absolute.

Warning!   If you specify an external file, it is strongly recommended that you do not store this file in your site's Workarea folder. If you store this file in the Workarea folder, the file will be lost when you upgrade.

Warning!   If you enter a valid EkML file at the MarkupLanguage property, the DisplayXslt property value is ignored.

String

 

DoInitFill

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 codebehind and have it render with your changes shown.

Boolean

DynamicParameter

Gets or sets the QueryString parameter to read a user ID dynamically. To use the default user ID, leave blank.

String

FavoritesTitle

The title shown at the top of the control.

String

Hide

Used to hide output of the control in design time and run time.

True = Hide control

False = Display control

Boolean

Language

Set a language for viewing the Favorites control. This property shows results in design-time (in Visual Studio) and at run-time (in a browser).

Integer

Link

Enter a link to the content Web page. This allows a user to click a link in the Favorites control and be taken to the content.

The link's variables are below.

{0}—represents the content ID

{1}—represents the content language

{2} - represents the content title

The link must have all three variables. The Web form can be relative or absolute. Below is an example.

contentpage.aspx?cid={0}&lang={1}&title={2}

String

LinkTarget

Determines the type of window that appears on this Web form when a user clicks an item in the Favorites control. The default is _self.

_Self - opens in same window

_Top - opens in parent window

_Blank - opens in new window

_Parent - opens in the parent frame

ItemLinkTargets

MarkupLanguage

Identify the template markup file that controls the display of the server control. For example, mymarkup.ekml. If the *.ekml file is located in the same folder as the Web form containing the server control, just enter its name. Otherwise, the path to the file can be relative or absolute.

See Also: Controlling Output with Ektron Markup Language

String

MaxResults

The Maximum number of items to fetch. 0 (zero) = unlimited.

Integer

Stylesheet

Specify the path to a style sheet for use with the server control. The location can be relative or absolute. Leave blank to use the default style sheet.

Warning!   If you enter a valid EkML file at the MarkupLanguage property, the Stylesheet property is ignored.

String

SuppressWrapperTags

Suppresses the output of the span/div tags around the control. The default is False.

True—Suppress wrap tags.

False—Allow wrap tags.

Boolean

WrapTag

Allows a developer to specify a server control’s tag.

The default is Span.

Span—The <span> tag is used to designate an inline portion of an HTML document as a span element.

Div—The <div> tag is used when you want to apply attributes to a block of code.

Custom—Allows you to use a custom tag.

String


Visit the Ektron Dev Center at http://dev.ektron.com 1-866 - 4 - EKTRON

Ektron CMS400.NET Reference Version 8.02 SP1 Rev 1

Ektron Documentation,© 2011 Ektron, Inc.