Hey all,
I've just rolled out some new features for all of the servers.
First up is the Monthly Archives feature. Go to the one of your weblog's
archive pages (anything with a date in the URL), and then take off the
last "/" (forward slash) and the day.
Here's an example. Start at this URL on my site:
<http://www.truerwords.net/index/2005/04/07>
Now, take off the "/07" from that URL, so you go to this page:
<http://www.truerwords.net/index/2005/04>
There you can see everything that I've posted in the month of April,
2005.
The technical side of this feature is done: it renders all of the items
from the specified month. However, there are still some things that need
polishing up:
- I think a site should offer either daily (old-style) or
monthly archives, but not both. It's just too darn many URLs,
and too much server load. There's no point to having both.
(Monthly archives are good, and they keep us compatible with
some of the other big names like Moveable Type.)
- More calendar-related macros are needed so that, if you're using
monthly archives, you can produce a list of archive months.
Probably something like weblog.calendar.listMonths, or
perhaps weblog.calendar.years (where each year would then
use a template to display its months).
- The channel month archives don't stop at the end of the month.
Oops. They only show content from the channel, but they show
as many days as are on the main weblog (the default channel).
New Conditionals
There are three new conditional macros, for determining if the page that
was requested is from the weblog archives.
- weblog.request.isArchive
- weblog.request.isArchiveDay
- weblog.request.isArchiveMonth
isArchiveDay returns true if the requested URL specifies a day, like the
first URL I provided near the top of this message.
isArchiveMonth returns true if the requested URL specifies a month, like
the second URL above.
isArchive returns true if either of the other are true. It's identical
to doing "weblog.request.isArchiveDay || weblog.request.isArchiveMonth".
However, if we ever add another archive format -- perhaps an archive
year, or topical archives? -- then isArchive will still return true in
those archive formats. (In other words, isArchive will always going to
be the most generic test.)
Comments and Questions, please! It's too quiet around here, and we're
getting very close to the end of my To Do list...
Seth