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 movabletype.org 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.
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.
http://www.garringer.net/foam
http://theoryboy.com
http://www.gnueconomy.net
http://www.hoerup.dk/tech
http://errant.org/dancing
http://www.sewhipithurts.com
http://www.engel-cox.org
http://www.s-phase.com/blog01
http://www.mymessymind.net
http://www.etherealreflections.com/blog
http://www.therant.info
http://www.bozzysworld.com
http://www.nothingistrue.net
http://www.dalqe.com/journal
http://www.tenth-muse.com
Argh, yes, that anchor thing drives me batty! I’m guilty of it too because I’m too lazy to change my template, but I am aware of the problem.
I would imagine many others are in the same boat. They see that it’s there but aren’t concerned because it doesn’t hurt anything. However, since it’s a small change I figured I’d research it and show people how to clean it up.
Hey thanks for the heads up. I just fixed mine.
uhh..errr…okay.
Long Links
Dan is talking about Permanent Links in MT . I found I was guilty of an extra anchor. You know
Oh dammit! I thought I’d got rid of mine, but they look to have crept back in last time I redesigned. Back in a jiffy …
How confusing, two different dans!