« The Travelling BPDU Problem | Main | Feed tagging in MT3.3 »

Implementing a ranked cloud list

So I installed MT, I used StyleCatcher to pick a theme. Nice one.

Hang on... All my tag clouds are actually bulleted list without any weighting. Surely there must be a way to fix that?

Looking at the source of the output of the tag cloud (sidebar) widget I saw that the entries have a "taglevel<n>" class on them, but the entry-tag list items don't. First change, in any templates with an entry-tag-list, add the following class to the list entries:

taglevel<$MTTagRank$>

Now to style it. I have used a scale of font sizes from 75% up to 200% with 25% steps for the tag ranks. Other attributes would be easy enough to fix (font-face, color, etc).

Add the following to the styles-site.css template:

.module.module-tag-cloud .module-list, .entry-tags {
  list-style: none;
}

.taglevel1  {
  display: inline;
  background: none;
  padding: 0;
  font-size: 200%;
}

.taglevel2 {
  display: inline;
  background: none;
  padding: 0;
  font-size: 175%;
}

.taglevel3 {
  display: inline;
  background: none;
  padding: 0;
  font-size: 150%;
}

.taglevel4 {
  display: inline;
  background: none;
  padding: 0;
  font-size: 125%;
}

.taglevel5 {
  display: inline;
  background: none;
  padding: 0;
  font-size: 100%;
}

.taglevel6 {
  display: inline;
  background: none;
  padding: 0;
  font-size: 75%;
}

TrackBack

TrackBack URL for this entry:
http://blog.s8n.net/mt/mt-tb.cgi/991

Post a comment

(If you haven't left a comment here before, you may need to be approved by the site owner before your comment will appear. Until then, it won't appear on the entry. Thanks for waiting.)

About

This page contains a single entry from the blog posted on August 22, 2006 11:16 AM.

The previous post in this blog was The Travelling BPDU Problem.

The next post in this blog is Feed tagging in MT3.3.

Many more can be found on the main index page or by looking through the archives.

Powered by
Movable Type 3.33