Wednesday, September 13, 2006

Blogger Labels

Yesterday I noticed that next to the dashboard on Blogger there was an option to convert my blog over to the Blogger 2.0 beta. Naturally, I couldn't resist. The chance to have a whole bunch of new features to play with and bits to toy around with is always going to get my attention.

One thing that got my interest was labels. A way to categorise posts. So I went through and added labels to a bunch of posts. These were mostly based on the technorati tags I had used on the entries. At the end of this first stage of labeling things, I wasn't entirely happy. For a start there were a bunch of labels that were only used once, the list looked really long, some of the labels were really just duplicates or subsets of others. So initially I tried to look to see if there were some setting I could set so that it would only show labels with a few posts. But such a setting doesn't exist. So I then looked at the html version of the template with the widgets expanded. It was a bit odd, but with some help files it's reasonably clear. So I tried putting a condition in that it would only display the labels with a count of more than 2. I try that and the labels disappear. A bit more playing around I find out that equals and not equals work, but greater than won't and a less than sign is just not on. So I just put in a few nested conditions with a few not equals going up to the limit I wanted, and now the only labels showing are those with at least two posts. In hindsight I don't really need the condition saying only show the labels with a non-zero count.

Anyway, this is mainly so that if someone else is trying the same thing they find it a bit easier than I did.

End Post
Writing time: 30 minutes
Time since last post: 1 day
Current media: Six Feet Under - Season 2

No comments: