TagCloud
The TagCloud server control shows a weighted list of taga keyword that you assign to a user, group, content, or library item to give it additional identification.s assigned to users, community groups, content, or library items. Tag sizes are proportional to the number of times they are assigned. For example, there are 2 tags, Software and Programming. If the Software tag is used 5 times and the Programming tag is used 2 times, the Software tag is approximately twice as large.
Use the TagType
property to determine which types of tags appear in the cloud. For example, set TagType
to User
to display user 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.
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.
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.
Inserting the TagCloud 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 TagCloud 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:TagCloud ID="TagCloud1" runat="server" />
- Click on
TagCloud
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.
TagCloud 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.
- 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.
- DynamicParameter (String)
By default, the
TagTemplate
property passes aTagId
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. - 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)
- 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 - MaxTagsDisplayed (Integer)
The maximum number of tags to display. 0 (zero) = 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.
- OrderBy (String)
The criteria by which tags are ordered in the tag cloud. Choices are:
- TaggedCount. Sort by how many times a tag is assigned
- Text. Sort alphabetically by tag name
- OrderByDirection (String)
Select the direction of the
OrderBy
property. Choose Ascending or Descending. - 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.
- TagTemplate (String)
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.
- If the
TagType
isUser
orCommunity Group
, enter a page hosting a Community Search server control. - If the
TagType
isContent
orLibrary
, enter a page hosting a templated search server control.
For example, in the Ektron Intranet starter site’s
tagcloud.aspx
page, the first 2 TagCloud controls link to users and community groups. So, this property is set toCommunitySearch.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 5 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 5 parameters are appended to yours.
- If the
- TagTemplateTarget (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.
- TagType (String)
Select the type of tags that appear in the tag cloud. Choices are:
- User
- CommunityGroup
- Content
- Library
- 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.