What is a Permalink?

03/24/2005

If you have ever read a weblog you will quite certainly have discovered the term "Permalink«. What is this? And why can't you find this type of link in a new Movable Type project?

Avoid Moving Targets

When opening a weblog you will initially see the main index page. This page lists the most recently published entries, usually sorted by date. The contents of this page is coming and going. An entry, which is there today, may not be there tomorrow.

Sometimes you want to link to another weblog's entry. Maybe you like that entry so much that you want to link to it from your own website. However, the index page is not well suited as the target for this link.

And this is the situation where permalinks are entering the arena. The name »permalink« suggests its meaning: it is a link which is permanently valid.

It is a basic principle of weblogs that new entries appear on the main index page. However, they are additionally saved in several archives. Among these archives is the »Individual Entry Archive« where a separate HTML page is created for each entry. Moreover, there might be a »Date Based Archive«, collecting entries according to their date of creation. Or there might also be a »Category Archive« containing all entries linked to a certain category.

The permalink is the link which points to the individual entry archive. It will stay valid, even if the entry is assigned another category or creation date.

If you look at a main index page you will often find the word »Permalink« under the text. It will lead you to the individual archive for this entry. If you navigate to this address, you can copy the URL from your browser's address bar and use it in your own pages.

Where are my Permalinks?

If you have just started to work with Movable Type you will realize that no permalinks seem to be on the main index page. At least the word »permalink« cannot be found.

If you look at the following screenshot...

Permalink

...you will see that the time field is a sensitive link. It is the permalink. Just click it and you will open the individual archive for this entry.

True Permalinks please!

Probably you want the permalinks to be recognizable as such. Fortunately Movable Type is very flexible and can be configured that way. We have to change one of the templates a little bit.

In Movable Type please select the menu item »templates« from the menu bar on the left side. Then in the group »Index Templates« choose the template »Main Index«. The HTML text shown in the next dialog is the template that is used for creating your weblog's main index page.

Scroll down a little bit until you find the following lines. The line breaks are a different, you should best search for the term »posted«.

<p class="posted">
Verfasst von <$MTEntryAuthor$> um
<a href="<$MTEntryPermalink valid_html="1"$>">
   <$MTEntryDate format="%X"$>
</a>

If you have some HTML knowledge you will probably recognize that the date of creation is made an anchor tag. Modify this segment as follows.

<p class="posted">
Erstellt von <$MTEntryAuthor$>
am <$MTEntryDate format="%d.%m.%Y %H:%M"$> |
<a href="<$MTEntryPermalink valid_html="1"$>">
   Permalink
</a>

The time of creation is now outside the anchor tag. Instead the term »Permalink« now is the sensitive word. Additionally I have changed the format for the date and time. Save the template and rebuild the entire website. Now all entries on your main index page will look different.

HTML-Code für Permalink

mgs | 03/24/2005

Feedback is welcome!

What do you think about this entry? Was it interesting or boring? I would like to hear your comments. If the text was helpful, please consider setting a link to http://www.movable-type-weblog.com/.

No spam please!

For protecting this weblog I have installed the MT-Approval Plugin. You have to view a new comment in preview mode, before it is saved on the server. Moreover, I will view your comment manually, before it is published. You can find more information on the subject in the entry Weblog Spamming Basics.

With an active TypeKey session, your comment will be published immediately.

Post a new comment

TypeKey has temporarily been disabled at this location. Please create your comment without using TypeKey or log in from the preview dialog.




Remember Me?


Comment

Ricardo Mestre | April 22, 2005 02:36 PM

Good idea, to have a Permalink explicitly stated as one! I'll do that on my blog ASAP.

Comment

Ricardo Mestre | May 8, 2005 11:51 PM

Done! Now I'm going to change the way date is displayed.