Why is this page text-only?

Results tagged “blogging” from Code Scene

Tips on Tagging

I've recently built a few blogs for friends and clients which I've setup with tag clouds. I've been asked serveral times for some recommendations on how to use tags when blogging, so here's a quick post with what I think are some best practices.

  • Keep your tags short and simple. "Football" is a good tag for a sports blog. "The Chicago Bears are going to be great this year despite Rex Grossman's inconsistencies" is not a good tag.
  • Limit the number of tags you use. Having a cloud of 700 tags probably isn't a good idea unless you're running a massive multi-faceted site.
  • Keep your tags consistent and re-use them. Don't use "TV" on one post and "television" on another. Re-using your tags allows them to grow and be weighted higher
  • Keep tags relevant to the content of your blog. I make a Rex Grossman reference above but I'm not going to tag this post with "football" or "Chicago Bears" because that wouldn't make sense to an audience of web developers.

Remember that your tag cloud is a navigation element. Having a massive tag cloud where every tag links to a single post isn't very useful to your users. On Code Scene I have about 25 tags that I consistently re-use so my tag cloud becomes an easy way to find all my posts on CSS, Movable Type, or some other topic. The number one rule for tagging blog posts is to keep it simple. 

Movable Type 4 Beta

Last week SixApart announced the release of the Movable Type 4 Beta and it looks to be well worth the wait. Code Scene runs on Movable Type 3.3 and I've been a long time advocate. It's excellent as a blogging platform and with a little tweaking, it can also be used as a CMS for projects with a limited budget.

I've previously blogged about the problems with Content Management Systems and also about extending Movable Type with plugins. Movable Type 4 seems like it could be the solution to many of the current issues. The new version has a lot of the most popular plugins functinality built in, such as WYSIWYG editing, file and photo management, and member registration. It's also comparitively inexpensive and very easy to use.  For smaller sites, or site/blog combos, Movable Type 4 looks to be a great way to offer your client's a CMS without shelling out thousands of dollars or spending countless hours writing your own.

Read the full list of Movable Type 4's new features or download the beta. There's no official release date yet but hopefully we'll have a final release sometime this summer.

Using Tags and Tag Clouds in Movable Type 3.3

I've been making a few updates to Code Scene, one of which is the addition of tags to each post. Tags are a quick and easy way to allow your visitors to find related blog posts. At the bottom of this post, for example, you'll see that it's been tagged as 'Movable Type'. Click that link and you'll be presented with a list of all other blog posts I've written about Movable Type.

Tags are a relatively new concept in Movable Type, available in version 3.3 and higher. If your hosting company hasn't upgraded yet (I'm looking at you Yahoo!) then you're out of luck until they do.

Tagging a post is simple. All you need to do is add a comma-delimited list into the "Tags" field when creating your entry.

Displaying them on the post page is as simple as:

<h4>Tags:</h4>
<p><MTEntryTags glue=" // ">
     <a href="<$MTTagSearchLink$>"><$MTTagName></a>
</MTEntryTags></p>

The "glue" parameter simply denotes what character(s) will be used to separate the tags.

Now that we've seen how easy it is to add tags, what about tag clouds? Tag clouds provide a quick and easy navigation mechanism for your users to see (and jump to) the different types of posts within your blog. It's kind of like categories, but better. I like to think of categories as top-level sections where posts can live, whereas tags act more like descriptors of what the post is about. I've added a tag cloud to the top-right column of Code Scene where the calendar used to be. Let's face it, I don't update often enough to need a calendar.

So now that you know what a tag cloud looks like, how do you create one? Easy, just use the built in Movable Type codes and add some styles to them.

<div id="tagCloud">
<h3>Tag Cloud</h3>
<p><MTTags glue=" ">
<a href="<$MTTagSearchLink$>" class="cloud<$MTTagRank max="10"$>"><$MTTagName$></a>
</MTTags></p>
</div>

The MTTags element gets all the blog's tags separated by the "glue" parameter. MTTagName and MTTagSearchLink give you the name of the tag and the link to the search page which will show all articles with that tag. MTTagRank gives each individual tag a ranking based on how many times it's been used compared to other tags. I've set the "max" parameter to 10 and embedded it inside of a class="cloud" tag so that each link will adopt a class based on it's rank. class1 for the most used tags all the way to class10 for the least.

Next, just set some CSS rules for these classes to differentiate them. I've set mine so that they get bigger and brighter the higher the tag is ranked, like so:

#tagCloud a.cloud10 { font-size: 1.2em; color: #68a9cc; }
#tagCloud a.cloud9 { font-size: 1.3em; color: #5ea5cc; }
...
#tagCloud a.cloud2 { font-size: 2.0em; color: #168ccc; }
#tagCloud a.cloud1 { font-size: 2.1em; color: #0d8acc; }

One last thing to point out is that this method will return ALL the tags in your blog. Sometimes, like my sidebar promo, you only want the top tags. Movable Type Enterprise has this functionality built in but it doesn't appear to have made it into the regular versions yet. However, we can achieve the same effect by using the Compare Plugin. This plugin allows us to easily compare values when building our Movable Type pages.

<MTTags glue=" ">
<MTIfLessOrEqual a="[MTTagRank max='10']" b="4" numeric="1">
<a href="<$MTTagSearchLink$>" class="cloud<$MTTagRank max="10"$>"><$MTTagName$></a>
</MTIfLessOrEqual>
</MTTags>

The above code compares the MTTagRank value to a static value of 4. So if a tag is ranked less than or equal to 4 it gets displayed. That gives me the top tags in my blog and I just add a link to view all the rest.

That's all there is to it. It's actually pretty easy to do and is a great way to boost the usability of your blog by helping users find related content.

Additional Resources:
Tag Reference from the Movable Type Manual
Everybody loves tags from the Movable Type blog
Compare plugin for Movable Type

Must Have Movable Type Plugins

I do my blogging with Movable Type and I think it's a great platform. There are times however when I need it to do something it wasn't intended to. Thankfully there's a large community of developers who've created fantastic plugins allowing all sorts of extra features for your site/blog. Here are some of my favorites:

Plugin Manager
This plugin will allow you to easily install all of your other plugins. It should be the first thing you setup on your new Movable Type install.

Right Fields
This indispensable plugin allows you to add extra custom fields to each Movable Type blog entry. Also includes an easy to use file upload component for storing files and a method for linking entries together on other blog posts.

Paged Archives
If you have a lot of content on your blog your archive templates can get very long. This plugin allows you to easily break those long pages into multiple pages with an easy to use paging navigation system.

EnhancedEntryEditing
Adds a WYSIWYG editor into the Movable Type entry screen making it much easier to format your posts.

Live Preview
See exactly what your posts will look like inside of your templates with all formatting applied before you publish them.

AutoSave
Automatically saves the post you're currently editing every minute (configurable) so that you never lose your work if you encounter a problem while blogging, such as a browser crash.

Those are just a handful of the plugins available but I think each one is especially powerful and should be part of any Movable Type blog. If you have others you think are worthwhile, leave a comment below.

And don't forget to support the people who put in the long hours to create these plugins. Buy a commercial license or make a donation.