« Richard Rorty, 4 October 1931 — 8 June 2007 | Main | Digital Cartesianism »

This Tag Cloud Goes to 11

In my previous post regarding tag clouds in MovableType, I note that Kohler’s method requires vigilance and frequent customization, both of which diminish the joy that comes with automation. However, the solution I provide improves on Kohler’s method only by capturing the overflow case. While this prevents tags from disappearing once they reach the top of the CSS ladder (i.e. once tags are used more than N times, where N is the number classes specified in the CSS ladder), the proportions of the CSS rungs in my solution would still have to be manually adjusted every now and again. The solution I detail here improves on my previous solution by paring back the CSS ladder and reducing the maintenance of the CSS ladder’s proportion to the changing of a single variable.

Where in your MovableType template you would like to have your tag cloud, insert this new and improved PHP code.

The quick-and-dirty explanation is that the overflow level is user-defined, and tags are placed on a CSS ladder whose rungs are ten percent of the ladder’s height. This means (as you might have guessed) that overflows go to 11.

The CSS stylesheet code block is now much cleaner.

Cheers. end of article