Favorites
The Favorites server control displays a list of Ektron content and external Web links (URLs) that a user has designated as favorite content. Within the control, Ektron content 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 content as a favorite, see SocialBar.
Inserting the Favorites 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 Favorites 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:Favorites ID="Favorites1" runat="server" />
- Click on
Favorites
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.
Favorites 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.
- DefaultFolderID (Long)
The default folder ID for this control to use when there is no matching dynamic parameter value passed.
- DefaultUserID (Long)
The default user ID for this control to use when there is no matching dynamic parameter value passed.
- DisplayMode (eDisplayMode)
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
- 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.
- FavoritesTitle (String)
The title shown at the top of the control.
- 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)(missing snippet link)
- Link (String)
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.
- {0}. Content ID
- {1}. Content language
- {2}. Content title
The link must have all 3 variables. The Web form can be relative or absolute. Below is an example.
contentpage.aspx?cid={0}&lang={1}&title={2}
- 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 LanguageEktron Markup Language - MaxResults (Integer)
The Maximum number of items to fetch. 0 (zero) = unlimited.
- 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.
Adding a URL to your favorites
- Log in and navigate to the profile page that hosts the Favorites control.
- Click Add Link.
- In the Name field, add a name for the URL link.
- In the Link field, add the URL.
- In the Description text area, add a description for the URL. This is optional.
- Click OK.
After a URL is added, it appears on the control's Links list.
You also can add a URL to your Favorites by clicking the Add to Favorites link on the Social Bar server control. See .
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.
To move a Favorite to a folder:
- Make sure the Favorites server control's
DisplayMode
property is set to Directory. - Log in to the website.
- Navigate to your profile page or the page the contains the Favorites server control.
- In the Favorites server control, click Add Folder.
- Enter a Name and Description for the folder.
- Optionally check one or more favorite items then click OK.
- Click Move on the Favorites server control.
- Select a folder to which the items will be moved.
- Click OK. A dialog box appears asking you confirm moving the items. You can find the Favorite content in the folder. Click the folder to see all content in that folder.
Deleting a favorites 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 MoveUp One Level. Deleting a folder also deletes all of its subfolders.
- Navigate to your profile page or a page the contains a Favorites server control.
- In the Favorites section of the screen, click Edit Folder () next to the folder’s title. A dialog box appears.
- Click Delete. A confirmation box appears.
- Click OK. The folder is deleted.