Tag-Clouds

Home | Site Map | Site Index

Tag-Clouds

Morphfolia provides support for tag-clouds. 

The tag-cloud on the home page of this site is an example; this particular tag-cloud is built into a page layout (which is included in the "Kudos" layout and appearance SDK, available for download).  It takes a collection of words from the content indexes, as shown below:

if (Display_Tag_Cloud)

{

Morphfolia.Business.ContentIndexer contentIndexer = new Morphfolia.Business.ContentIndexer();

Morphfolia.WebControls.TagCloud tagCloud = new Morphfolia.WebControls.TagCloud();

tagCloud.NumberOfTagDivisons = TagCloudNumberOfTagDivisons;

tagCloud.MinimumOccurranceThreshold = TagCloudMinimumOccurranceThreshold;

tagCloud.Words = contentIndexer.GetWordsForTagCloud(tagCloud.MinimumOccurranceThreshold);

tagCloud.NavigateUrl = string.Format("{0}/SearchResults.aspx", Morphfolia.PublishingSystem.WebUtilities.VirtualApplicationRoot());

tagCloud.NavigateUrlQueryStringKey = Morphfolia.Common.Constants.Framework.Various.SearchCriteriaIndentifier;

if (!TagCloudCssClass.Equals(string.Empty))

{

tagCloud.CssClass = TagCloudCssClass;

}

tdC3.Controls.Add(tagCloud);

}

This example takes it's source words from the content indexes - the words fed into it are the most highly occuring ones; this makes the tag-cloud different from 'standard' ones that are driven by arbitrarily defined tags.  Using the Words property you can pass in any collection of words you like, and these will include 'hit' counts that are displayed as a tooltip on mouseover.

The use of word by occurance works more like a folksonomy, rather than a more tightly defined taxonomy, and this can be an advantage or disadvantage depending on what you want; it certainly provides users with a different view of your site.

Support for 'standard' tag taxonomies will be implemented at some stage, probably as part of the blogging capabilities which will be added soon.

Last Modified 9/03/2009 10:38:32 p.m. by AdrianK (adriank [at] morphological [dot] geek [dot] nz)