Month: <span>June 2002</span>

Jeroen Frijters has a new Radio Weblog, where he’s documenting his implementation of a Java Virtual Machine in .NET.

Jake's Radio 'Blog

Comments closed

Day 8 of Mark Pilgrim’s “30 days to a more accessible weblog”: Constructing meaningful page titles. Mark writes:

“Every page of your weblog should have a unique and meaningful page title… Date-based archive pages should include the name of your weblog, followed by the date (or date range) for the page…

“Unfortunately, I do not know how to customize page titles satisfactorily in Blogger or Radio. Radio has a <%longDate%> macro, but it can not be used as part of the page title…”

It’s true that longDate doesn’t work in the template, but there is a way to do this. Here’s how:

1. Edit your home page template.

  1. Find the line (probably near the top) which reads:

<title><%title%></title>

  1. Between <%title%> and </title>, add the following macro:

<%local (d); if radio.weblog.file.getArchiveFileDate (radioResponder.fileBeingRendered, @d) {": " + string.dateString (d)} else {""}%>

Note: be careful if you copy and paste this code — there should be no line-breaks.

  1. Click the Submit button.

The next time any of your archive pages are published, they’ll have a date in their title.

There’s no need to stick with the default date format. You can format the date however you want — Just replace the string.dateString (d) part with your own code. See the DocServer pages for the date and string verbs for some places to start digging.

Jake's Radio 'Blog Macros

Comments closed

Jake's Radio 'Blog

Comments closed