Better Permalinks - May 13, 2010

First, a programming note to anyone who subscribes to this blog via RSS, most of our updates have moved to Twitter!  Follow us at http://twitter.com/VaePlatform.

We just made a pretty cool change to the way permalinks work on Vae.  They've always been a confluence of 2 things:  they represent both a context and a particular HTML template.  Well, what if you want to render a different page but within the same context?

For example, let's say you have a collection called Items, permalinking to HTML page called item.html.  A permalink for an item (say, Freefall's Road Trip EP album) might look like http://example.com/item/freefall-road-trip-ep.  This is a very semantic, readable, and SEO-friendly URL.  I like it a lot. 

But what if you had another page that renders the reviews of that album?  Say, reviews.html.  Before, you would need to link to that page explicitly and pass the ID of the item in as a parameter.  The URL (as generated by the <v:a> tag) looked like this: http://example.com/reviews/13423. Definitely less obvious and less SEO-friendly.

We've made this better.  Now, the URL will be generated by appending the new template HTML file name to the end of the permalink.  That review link will now look like http://example.com/item/freefall-road-trip-ep/reviews.  Much better.  Our page rendering engine will know to load the HTML file called reviews and render it within the context of the Road Trip EP

The <v:a> tag has been updated to automatically generate the new-style URLs.  If you're generating URLs manually in PHP, you can just start generating links in the new style.

Enjoy!