permanent links in MT

An epidemic of gargantuan proportions has swept Movable Type blogs everywhere. The symptom is the use of non-existent anchors in their permanent links. An anchor (text after a # in the URL) is only needed if there is a corresponding target. If your permanent links go to a page with more than one entry on it, anchors will make the browser go directly to that position on the page. If you’re linking directly to the individual archive page, there’s no anchor, so while it doesn’t stop anything from working, it’s not doing any good either. It also makes the URL longer than it needs to be.

I was a tad hasty in calling it an epidemic, but I figured that would get people’s attention.

The default Movable Type permanent link goes to the monthly archive, with the anchor being the individual ID of the entry. If you switch to using individual archives (which many people do) and leave everything else the same, your links will probably all have the extra anchor. That’s my theory as to why it is so common.

Perusing the recently updated blog list on revealed a multitude of blogs with the extra anchor on their permanent links. The cure is quite simple — remove the anchor. As long as your “Preferred Archive Type” (Configuration -> Preferences) is set to Individual you can use the MTEntryLink. I tested the MTPermaLink tag but it didn’t seem to work as I expected, so I simply use the full tag with archive_type.

<$MTEntryLink archive_type=”Individual”$>

That way my links work whether or not I have the “Preferred Archive Type” set to Individual. Here are some blogs that have the extra anchor.