Ektron CMS400.Net Reference

>>Managing User Communities > Tags > TagCloud Server Control

TagCloud Server Control

The TagCloud server control depicts a weighted list of tags assigned to users, community groups, content, or library items. Each tag’s size is proportional to the number of times it is assigned.

For example, there are two tags, Mom and Dad. If the Mom tag is used five times and the Dad tag is used twice, the Mom tag is approximately twice as large.

See Also: Tags

Determining the Contents of the Tag Cloud

Use the TagType property to determine which types of tags appear in the cloud. For example, set TagType to User to display user tags.

Setting a Maximum Number of Tags

You can set a maximum number of tags to display via the MaxTagsDisplayed property. This property makes sense if the Orderby property is set to Taggedcount. In this case, the cloud only displays items with the highest number of tags.

Sorting the Tags

Use the OrderBy property to sort tags within a cloud. Your choices are alphabetical or by Taggedcount (the number of times an item is tagged). Then, use the OrderByDirection property to determine if items are sorted in ascending or descending order.

Linking Tag Cloud Items

Within a tag cloud, you can link tags to their source items. If you do, site visitors can click a tag to launch a search of all users, community groups, content, or library items to which the tag is assigned. For example, if someone views a user-based tag cloud and clicks Motorcycles, the community search page appears, showing all users tagged with Motorcycles.

To make a tag cloud’s items searchable, add a path to the Web form containing the Search server control in the TagTemplate property.

TagCloud Server Control Properties

The TagCloud 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 the server control’s data is cached. The default is 0 (zero). This is the amount of time, in seconds, a control’s data is cached. For example, if you want to cache the data for five minutes, set this property to 300 (three hundred). See Also: Caching with Server Controls

Double

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.

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

By default, the TagTemplate property passes a TagId parameter, whose value is the tag that a site visitor clicked in the tag cloud. Use this property to manually override that parameter and set the TagID value by hand.

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 server control. This property shows results in design-time (in Visual Studio) and at run-time (in a browser).

Integer

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

MaxTagsDisplayed

The maximum number of tags to display. Set to 0 (zero) for unlimited.

If you set a maximum, and more than that number of tags are applied, then only the most frequently-used tags appear. For example, if you enter ten, the ten tags applied the most number of times appear.

Integer

OrderBy

The criteria by which the tags are ordered within the tag cloud. Choices are:

TaggedCount - sort by how many times a tag is assigned

Text - sort alphabetically by tag name

String

OrderByDirection

Select the direction of the OrderBy property. Choose Ascending or Descending.

String

Stylesheet

Specify the path to a style sheet for use with this 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

TagTemplate

If you want a tag cloud’s items to link to a page that shows all items with that tag, add a path to a Web form page that hosts the appropriate search control. The path can be relative or absolute.

See Also: Linking Tag Cloud Items

If the TagType is User or Community Group, enter a page hosting a Community Search server control.

If the TagType is Content or Library, enter a page hosting a Web Search server control.

For example, in the Ektron CMS400.NET Intranet starter site’s tagcloud.aspx page, the first two TagCloud controls link to users and community groups. So, this property is set to CommunitySearch.aspx, a Web form that hosts the CommunitySearch server control.

When a site visitor clicks a tag cloud item, the Community Search page displays, populated with search results for the clicked tag. The visitor can click any result to see more about it.

The following five parameters are added to the link’s QueryString, and pass tag information to the destination Web form. Its search server control uses the parameters to populate the search.

searchtag or searchgrptag - searchtag represents the tag’s text for users; searchgrptag represent the tag’s text for community groups

TagId - the clicked tag’s ID

TagLanguage - the clicked tag’s language; only search results in this language appear

TagCount - the number of times the tag has been assigned

TagType - the tag’s type: user, community group, content or library item. This value is obtained from the TagType property (described below).

In addition to these parameters, you can add your own by defining them in the path. If you do, the above five parameters are appended to yours.

String

TagTemplateTarget

Determines the type of window that appears on this Web form when a user clicks an item in the dynamic content box. 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

TagType

Select the type of tags that appear in the tag cloud. Choices are:

User

CommunityGroup

Content

Library

String

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.