Read the Funky Manual
By Oli
At 5:28 PM · Sunday, 17 August · 2003
To Coding · HTML · Weblogging
It always helps when you read the manual. There’s an MT option called "remove_html", so all I had to do was change my individual archive template from
<title><$MTBlogName$>: <$MTEntryTitle smarty_pants="1"$></title>
to
<title><$MTBlogName$>: <$MTEntryTitle remove_html="1" smarty_pants="1"$></title>
I’ve attempted to get around the short, non-crufty URL/long, informative title problem by using MTKeyValues. I’ve changed
<$MTArchiveDate format="%Y/%m/%d"$>/<$MTEntryTitle dirify="1"$>
to
<$MTArchiveDate format="%Y/%m/%d"$>/<MTKeyValues><MTIfNoKeyExists key="url"><$MTEntryTitle dirify="1"$></MTIfNoKeyExists><MTIfKeyExists key="url"><MTKeyValue key="url"></MTIfKeyExists></MTKeyValues>
Now if I have “url=nice_short_url” in my Extended Entry field, this will be used in place of the story’s dirified title, but with the dirified title as a fallback. It also meant I’ve commented out the Extended Entry tag in my templates, because I’m only using it for MTKeyValues tags. This will involve some fun if I ever decide to use it for text, but I think this is better than using the Keywords field.
I’ve also just realised that my naïve attempt to define computer languages (eg <code lang="css">) for the <code> tag is invalid - computer languages are explicitly excluded from language codes
. I’ll change to using a title attribute, although I’m surprised there’s no official way of doing this.